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

Unified Diff: content/browser/android/media_player_manager_impl.h

Issue 15876006: Allow some Android media player implementation to be overridden by embedders. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed indent Created 7 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
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 d1c9bb26f22d9008767fe9b84006b8be9291805a..ce2e8f1a6920d90827f8d2afa8d84528f9a271bb 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();
+ 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(
@@ -89,31 +89,39 @@ 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,
- bool is_media_source,
- 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 OnEnterFullscreen(int player_id);
bulach 2013/05/29 18:31:23 make clang happy, append OVERRIDE :)
whywhat 2013/05/29 18:50:12 These are not overrides but virtual methods to ove
+ virtual void OnExitFullscreen(int player_id);
+ virtual void OnInitialize(
+ int player_id,
+ const GURL& url,
+ bool is_media_source,
+ const GURL& first_party_for_cookies);
+ 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);
void OnMediaSeekRequestAck(int player_id);
#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_;
« no previous file with comments | « no previous file | content/browser/android/media_player_manager_impl.cc » ('j') | media/base/android/media_player_android.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698