Index: media/base/android/media_player_android.h |
diff --git a/media/base/android/media_player_android.h b/media/base/android/media_player_android.h |
index 8928222156bc3078098507ac81452009c0d44185..7a2871d29795183f3bf82e0fac7ca6ea2ac21272 100644 |
--- a/media/base/android/media_player_android.h |
+++ b/media/base/android/media_player_android.h |
@@ -83,6 +83,12 @@ class MEDIA_EXPORT MediaPlayerAndroid { |
GURL frame_url() { return frame_url_; } |
+ // 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(); |
+ |
protected: |
MediaPlayerAndroid(int player_id, |
MediaPlayerManager* manager, |
@@ -101,12 +107,6 @@ class MEDIA_EXPORT MediaPlayerAndroid { |
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(); |
- |
// When destroying a subclassed object on a non-UI thread |
// it is still required to destroy the |listener_| related stuff |
// on the UI thread. |
@@ -115,6 +115,8 @@ class MEDIA_EXPORT MediaPlayerAndroid { |
MediaPlayerManager* manager() { return manager_; } |
+ base::WeakPtr<MediaPlayerAndroid> WeakPtrForUIThread(); |
+ |
RequestMediaResourcesCB request_media_resources_cb_; |
private: |