Chromium Code Reviews| Index: content/browser/android/media_player_manager_impl.h |
| diff --git a/content/browser/android/media_player_manager_impl.h b/content/browser/android/media_player_manager_impl.h |
| index 61c1557f416b0143e5e48d6adf961dddcf2ebb39..a6c359ea430797e94aaf74ee0f9b2e9c77701a53 100644 |
| --- a/content/browser/android/media_player_manager_impl.h |
| +++ b/content/browser/android/media_player_manager_impl.h |
| @@ -38,11 +38,11 @@ class MediaPlayerManagerImpl |
| virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| // Fullscreen video playback controls. |
| - void FullscreenPlayerPlay(); |
| - void FullscreenPlayerPause(); |
| - void FullscreenPlayerSeek(int msec); |
| - void ExitFullscreen(bool release_media_player); |
| - void SetVideoSurface(jobject surface); |
| + virtual void FullscreenPlayerPlay(); |
|
qinmin
2013/05/25 04:41:44
if you really need to override so many functions,
whywhat
2013/05/28 15:16:40
I only need to override a few of them but it feels
|
| + virtual void FullscreenPlayerPause(); |
| + virtual void FullscreenPlayerSeek(int msec); |
| + virtual void ExitFullscreen(bool release_media_player); |
| + virtual void SetVideoSurface(jobject surface); |
| // media::MediaPlayerManager overrides. |
| virtual void OnTimeUpdate( |
| @@ -87,30 +87,36 @@ class MediaPlayerManagerImpl |
| // method of MediaPlayerManager or the derived classes constructors. |
| explicit MediaPlayerManagerImpl(RenderViewHost* render_view_host); |
| - private: |
| // Message handlers. |
| - void OnEnterFullscreen(int player_id); |
| - void OnExitFullscreen(int player_id); |
| - void OnInitialize(int player_id, const GURL& url, |
| + virtual void OnEnterFullscreen(int player_id); |
|
qinmin
2013/05/29 04:42:19
all these message handlers are now public just for
whywhat
2013/05/29 15:49:18
The handlers are protected, not public. Not only I
|
| + virtual void OnExitFullscreen(int player_id); |
| + virtual void OnInitialize(int player_id, const GURL& url, |
| bool is_media_source, |
|
qinmin
2013/05/29 04:42:19
fix indentation
whywhat
2013/05/29 15:49:18
Done.
|
| const GURL& first_party_for_cookies); |
| - void OnStart(int player_id); |
| - void OnSeek(int player_id, base::TimeDelta time); |
| - void OnPause(int player_id); |
| - void OnReleaseResources(int player_id); |
| - void OnDestroyPlayer(int player_id); |
| - void OnDemuxerReady( |
| + virtual void OnStart(int player_id); |
| + virtual void OnSeek(int player_id, base::TimeDelta time); |
| + virtual void OnPause(int player_id); |
| + virtual void OnReleaseResources(int player_id); |
| + virtual void OnDestroyPlayer(int player_id); |
| + virtual void OnDemuxerReady( |
| int player_id, |
| const media::MediaPlayerHostMsg_DemuxerReady_Params& params); |
| - void OnReadFromDemuxerAck( |
| + virtual void OnReadFromDemuxerAck( |
| int player_id, |
| const media::MediaPlayerHostMsg_ReadFromDemuxerAck_Params& params); |
| #if defined(GOOGLE_TV) |
| - void OnNotifyExternalSurface( |
| + virtual void OnNotifyExternalSurface( |
| int player_id, bool is_request, const gfx::RectF& rect); |
| #endif |
| + // Adds a given player to the list. |
| + void AddPlayer(media::MediaPlayerAndroid* player); |
| + |
| + // Removes the player with the specified id. |
| + void RemovePlayer(int player_id); |
| + |
| + private: |
| // An array of managed players. |
| ScopedVector<media::MediaPlayerAndroid> players_; |