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

Unified Diff: webkit/media/android/webmediaplayer_manager_android.h

Issue 10919075: Move android mediaplayer from render process to browser process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressing comments and resolving merge conflicts Created 8 years, 3 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: webkit/media/android/webmediaplayer_manager_android.h
diff --git a/webkit/media/android/webmediaplayer_manager_android.h b/webkit/media/android/webmediaplayer_manager_android.h
index ab29303626c16481d6f88be75fefd65385c7cebd..29482b705d7cdea77bad3b744733f7c295517385 100644
--- a/webkit/media/android/webmediaplayer_manager_android.h
+++ b/webkit/media/android/webmediaplayer_manager_android.h
@@ -5,7 +5,6 @@
#ifndef WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_MANAGER_ANDROID_H_
#define WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_MANAGER_ANDROID_H_
-#include <jni.h>
#include <map>
#include "base/basictypes.h"
@@ -14,34 +13,24 @@ namespace webkit_media {
class WebMediaPlayerAndroid;
-// Class for managing all the WebMediaPlayerAndroid objects in a renderer
-// process.
+// Class for managing all the WebMediaPlayerAndroid objects in the same
+// RenderView.
class WebMediaPlayerManagerAndroid {
public:
WebMediaPlayerManagerAndroid();
- ~WebMediaPlayerManagerAndroid();
+ virtual ~WebMediaPlayerManagerAndroid();
// Register and unregister a WebMediaPlayerAndroid object.
int RegisterMediaPlayer(WebMediaPlayerAndroid* player);
void UnregisterMediaPlayer(int player_id);
- // Called when a mediaplayer starts to decode media. If the number
- // of active decoders hits the limit, release some resources.
- // TODO(qinmin): we need to classify between video and audio decoders.
- // Audio decoders are inexpensive. And css animations often come with
- // lots of small audio files.
- void RequestMediaResources(int player_id);
-
- // Release all the media resources on the renderer process.
+ // Release all the media resources managed by this object.
void ReleaseMediaResources();
// Get the pointer to WebMediaPlayerAndroid given the |player_id|.
WebMediaPlayerAndroid* GetMediaPlayer(int player_id);
private:
- // Get the number of active players.
- int32 GetActivePlayerCount();
-
// Info for all available WebMediaPlayerAndroid on a page; kept so that
// we can enumerate them to send updates about tab focus and visibily.
std::map<int32, WebMediaPlayerAndroid*> media_players_;
« no previous file with comments | « webkit/media/android/webmediaplayer_in_process_android.cc ('k') | webkit/media/android/webmediaplayer_manager_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698