+ // TODO(qinmin): Simplify the MediaPlayerListener class to only listen to
+ // media interrupt events. And have a separate child class to listen to all
+ // the events needed by MediaPlayerBridge. http://crbug.com/422597.
+ // MediaPlayerListener callbacks.
+ virtual void OnVideoSizeChanged(int width, int height);
+ virtual void OnMediaError(int error_type);
+ virtual void OnBufferingUpdate(int percent);
+ virtual void OnPlaybackComplete();
+ virtual void OnMediaInterrupted();
+ virtual void OnSeekComplete();
+ virtual void OnMediaPrepared();
+
+ // Attach/Detaches |listener_| for listening to all the media events. If
+ // |j_media_player| is NULL, |listener_| only listens to the system media
+ // events. Otherwise, it also listens to the events from |j_media_player|.
+ void AttachListener(jobject j_media_player);
+ void DetachListener();
+