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..d907996073203db4d3d82f51852034f2a8ae52d8 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,10 @@ class MEDIA_EXPORT MediaPlayerAndroid { |
MediaPlayerManager* manager() { return manager_; } |
+ base::WeakPtr<MediaPlayerAndroid> WeakPtrForUIThread() { |
qinmin
2015/05/14 17:54:08
this shouldn't be inlined, not a simple getter/set
Tima Vaisburd
2015/05/15 00:12:40
Done.
|
+ return weak_factory_.GetWeakPtr(); |
+ } |
+ |
RequestMediaResourcesCB request_media_resources_cb_; |
private: |