Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(607)

Unified Diff: media/base/android/media_player_android.h

Issue 899473002: Fix a crash that MediaPlayerAndroid weak_ptr is incorrectly used across thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | media/base/android/media_player_listener.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 cd5a92f18e1239fca5f9fa2df61e1e4771a303c2..6c534e80ad589d99f61d01d0c3b7e869e90a0401 100644
--- a/media/base/android/media_player_android.h
+++ b/media/base/android/media_player_android.h
@@ -75,16 +75,6 @@ class MEDIA_EXPORT MediaPlayerAndroid {
// Associates the |cdm| with this player.
virtual void SetCdm(BrowserCdm* cdm);
- int player_id() { return player_id_; }
-
- GURL frame_url() { return frame_url_; }
-
- protected:
- MediaPlayerAndroid(int player_id,
- MediaPlayerManager* manager,
- const RequestMediaResourcesCB& request_media_resources_cb,
- const GURL& frame_url);
-
// 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.
@@ -97,6 +87,16 @@ class MEDIA_EXPORT MediaPlayerAndroid {
virtual void OnSeekComplete();
virtual void OnMediaPrepared();
+ int player_id() { return player_id_; }
+
+ GURL frame_url() { return frame_url_; }
+
+ protected:
+ MediaPlayerAndroid(int player_id,
+ MediaPlayerManager* manager,
+ const RequestMediaResourcesCB& request_media_resources_cb,
+ const GURL& 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|.
@@ -108,8 +108,6 @@ class MEDIA_EXPORT MediaPlayerAndroid {
RequestMediaResourcesCB request_media_resources_cb_;
private:
- friend class MediaPlayerListener;
-
// Player ID assigned to this player.
int player_id_;
« no previous file with comments | « no previous file | media/base/android/media_player_listener.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698