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

Unified Diff: chrome/app/android/chrome_main_delegate_android.cc

Issue 928643003: Upstream Chrome for Android Cast. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix dependencies (second attempt). Created 5 years, 9 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 | « chrome/app/android/DEPS ('k') | chrome/browser/android/chrome_jni_registrar.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/app/android/chrome_main_delegate_android.cc
diff --git a/chrome/app/android/chrome_main_delegate_android.cc b/chrome/app/android/chrome_main_delegate_android.cc
index 81cf6dbd14464d0e563e7c91abbbe1dd1d1c0d89..24291dee569143a4790d52ad8c6863db5b071380 100644
--- a/chrome/app/android/chrome_main_delegate_android.cc
+++ b/chrome/app/android/chrome_main_delegate_android.cc
@@ -8,9 +8,23 @@
#include "base/trace_event/trace_event.h"
#include "chrome/browser/android/chrome_startup_flags.h"
#include "chrome/browser/android/metrics/uma_utils.h"
+#include "chrome/browser/android/metrics/uma_utils.h"
+#include "chrome/browser/media/android/remote/remote_media_player_manager.h"
#include "components/startup_metric_utils/startup_metric_utils.h"
+#include "content/browser/media/android/browser_media_player_manager.h"
#include "content/public/browser/browser_main_runner.h"
+namespace {
+
+content::BrowserMediaPlayerManager* CreateRemoteMediaPlayerManager(
+ content::RenderFrameHost* render_frame_host,
+ content::MediaPlayersObserver* audio_monitor) {
+ return new remote_media::RemoteMediaPlayerManager(render_frame_host,
+ audio_monitor);
+}
+
+} // namespace
+
// ChromeMainDelegateAndroid is created when the library is loaded. It is always
// done in the process's main Java thread. But for non browser process, e.g.
// renderer process, it is not the native Chrome's main thread.
@@ -19,7 +33,6 @@ ChromeMainDelegateAndroid::ChromeMainDelegateAndroid() {
ChromeMainDelegateAndroid::~ChromeMainDelegateAndroid() {
}
-
void ChromeMainDelegateAndroid::SandboxInitialized(
const std::string& process_type) {
ChromeMainDelegate::SandboxInitialized(process_type);
@@ -49,5 +62,9 @@ int ChromeMainDelegateAndroid::RunProcess(
bool ChromeMainDelegateAndroid::BasicStartupComplete(int* exit_code) {
SetChromeSpecificCommandLineFlags();
+
+ content::BrowserMediaPlayerManager::RegisterFactory(
+ &CreateRemoteMediaPlayerManager);
+
return ChromeMainDelegate::BasicStartupComplete(exit_code);
}
« no previous file with comments | « chrome/app/android/DEPS ('k') | chrome/browser/android/chrome_jni_registrar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698