Chromium Code Reviews| 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..c9dfb3fa00197d08251833ff7f7f8460c7a7bf16 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() { delete this; } |
| + |
| // Passing an external java surface object to the player. |
| virtual void SetVideoSurface(gfx::ScopedJavaSurface surface) = 0; |
| @@ -102,6 +106,7 @@ class MEDIA_EXPORT MediaPlayerAndroid { |
| // events. Otherwise, it also listens to the events from |j_media_player|. |
| void AttachListener(jobject j_media_player); |
| void DetachListener(); |
| + void DestroyListener(); |
|
xhwang
2015/05/06 17:42:44
When do we need to call this?
Tima Vaisburd
2015/05/08 07:30:54
Changed the name to DestroyListenerOnUIThread and
|
| void SetAudible(bool is_audible); |
| MediaPlayerManager* manager() { return manager_; } |