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

Unified Diff: webkit/support/webkit_support.cc

Issue 10664003: Add webkit_support::ReleaseMediaResources() on Android (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 6 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 | « webkit/support/webkit_support.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/support/webkit_support.cc
===================================================================
--- webkit/support/webkit_support.cc (revision 143730)
+++ webkit/support/webkit_support.cc (working copy)
@@ -57,6 +57,9 @@
#include "webkit/glue/weburlrequest_extradata_impl.h"
#include "webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h"
#include "webkit/gpu/webgraphicscontext3d_in_process_impl.h"
+#if defined(OS_ANDROID)
+#include "webkit/media/android/webmediaplayer_manager_android.h"
+#endif
#include "webkit/media/webmediaplayer_impl.h"
#include "webkit/plugins/npapi/plugin_list.h"
#include "webkit/plugins/npapi/webplugin_impl.h"
@@ -156,6 +159,11 @@
// TestWebKitPlatformSupport must be instantiated after MessageLoopType.
webkit_platform_support_.reset(
new TestWebKitPlatformSupport(unit_test_mode));
+
+#if defined(OS_ANDROID)
+ media_player_manager_.reset(
+ new webkit_media::WebMediaPlayerManagerAndroid());
+#endif
}
~TestEnvironment() {
@@ -189,6 +197,10 @@
FilePath mock_current_directory() const {
return mock_current_directory_;
}
+
+ webkit_media::WebMediaPlayerManagerAndroid* media_player_manager() {
+ return media_player_manager_.get();
+ }
#endif
private:
@@ -200,6 +212,7 @@
#if defined(OS_ANDROID)
FilePath mock_current_directory_;
+ scoped_ptr<webkit_media::WebMediaPlayerManagerAndroid> media_player_manager_;
#endif
};
@@ -384,6 +397,12 @@
return CreateMediaPlayer(frame, client, NULL);
}
+#if defined(OS_ANDROID)
+void ReleaseMediaResources() {
+ test_environment->media_player_manager()->ReleaseMediaResources();
+}
+#endif
+
WebKit::WebApplicationCacheHost* CreateApplicationCacheHost(
WebFrame*, WebKit::WebApplicationCacheHostClient* client) {
return SimpleAppCacheSystem::CreateApplicationCacheHost(client);
« no previous file with comments | « webkit/support/webkit_support.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698