summaryrefslogtreecommitdiffstats
path: root/content/browser/browser_main_runner.cc
diff options
context:
space:
mode:
authorqinmin@chromium.org <qinmin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-19 20:28:52 +0000
committerqinmin@chromium.org <qinmin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-19 20:28:52 +0000
commit780fc824225e958594b4b0334f3d6d2dbc5ebf4e (patch)
tree4bba0c50e65162524bdc2860356d89002b74e0c6 /content/browser/browser_main_runner.cc
parentafd2b9217c8384fb4ee3113964659775c9aea60d (diff)
downloadchromium_src-780fc824225e958594b4b0334f3d6d2dbc5ebf4e.zip
chromium_src-780fc824225e958594b4b0334f3d6d2dbc5ebf4e.tar.gz
chromium_src-780fc824225e958594b4b0334f3d6d2dbc5ebf4e.tar.bz2
Move android mediaplayer from render process to browser process.
Due to UID isolation for security reasons, the render process can no longer have permissions to access internet. Since Android mediaplayer requires internet permission to work, it has to be moved to the browser process to resolve this. Here are the changes included in this patch: 1. Make WebMediaPlayerAndroid a common base class for WebMediaPlayerImplAndroid and WebMediaPlayerInProcessAndroid. WebMediaPlayerImplAndroid places the android mediaplayer in the brower process, this will be used for future chrome on android releases. WebMediaPlayerInProcessAndroid still places the android mediaplayer in the render process, this is being used for Layout tests. We will deprecate this later. 2.Added a commandline flag kMediaPlayerInRenderProcess to allow switching between these 2 modes 3.MediaPlayerBridge now takes over all the logics originally in WebMediaPlayerAndroid. This is to shield WMPA from knowing the internal state of the mediaplayer. BUG= Review URL: https://chromiumcodereview.appspot.com/10919075 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157596 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/browser_main_runner.cc')
-rw-r--r--content/browser/browser_main_runner.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/content/browser/browser_main_runner.cc b/content/browser/browser_main_runner.cc
index bdb6eff..4333b75 100644
--- a/content/browser/browser_main_runner.cc
+++ b/content/browser/browser_main_runner.cc
@@ -24,6 +24,10 @@
#include "ui/base/win/tsf_bridge.h"
#endif
+#if defined(OS_ANDROID)
+#include "content/browser/android/surface_texture_peer_browser_impl.h"
+#endif
+
bool g_exited_main_message_loop = false;
namespace {
@@ -95,6 +99,13 @@ class BrowserMainRunnerImpl : public content::BrowserMainRunner {
ui::TsfBridge::Initialize();
#endif // OS_WIN
+#if defined(OS_ANDROID)
+ content::SurfaceTexturePeer::InitInstance(
+ new content::SurfaceTexturePeerBrowserImpl(
+ parameters.command_line.HasSwitch(
+ switches::kMediaPlayerInRenderProcess)));
+#endif
+
main_loop_->CreateThreads();
int result_code = main_loop_->GetResultCode();
if (result_code > 0)