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

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

Issue 1076013002: Added stub MediaSourcePlayer for developing behind the flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed clang build Created 5 years, 7 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 | « media/base/android/media_codec_player.cc ('k') | media/base/android/media_player_android.cc » ('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 d9091d4195b414f065ab9a5ae319a373a43a2b11..8928222156bc3078098507ac81452009c0d44185 100644
--- a/media/base/android/media_player_android.h
+++ b/media/base/android/media_player_android.h
@@ -39,6 +39,10 @@ class MEDIA_EXPORT MediaPlayerAndroid {
// Callback when the player needs decoding resources.
typedef base::Callback<void(int player_id)> RequestMediaResourcesCB;
+ // Virtual destructor.
+ // For most subclasses we can delete on the caller thread.
+ virtual void DeleteOnCorrectThread();
+
// Passing an external java surface object to the player.
virtual void SetVideoSurface(gfx::ScopedJavaSurface surface) = 0;
@@ -102,6 +106,11 @@ class MEDIA_EXPORT MediaPlayerAndroid {
// 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.
+ void DestroyListenerOnUIThread();
void SetAudible(bool is_audible);
MediaPlayerManager* manager() { return manager_; }
« no previous file with comments | « media/base/android/media_codec_player.cc ('k') | media/base/android/media_player_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698