Chromium Code Reviews| 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..6ad14e374e1136399dcb341a65a8637034517965 100644 |
| --- a/chrome/app/android/chrome_main_delegate_android.cc |
| +++ b/chrome/app/android/chrome_main_delegate_android.cc |
| @@ -8,7 +8,10 @@ |
| #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" |
| // ChromeMainDelegateAndroid is created when the library is loaded. It is always |
| @@ -19,6 +22,12 @@ ChromeMainDelegateAndroid::ChromeMainDelegateAndroid() { |
| ChromeMainDelegateAndroid::~ChromeMainDelegateAndroid() { |
| } |
| +static content::BrowserMediaPlayerManager* CreateRemoteMediaPlayerManager( |
|
Bernhard Bauer
2015/03/13 12:18:02
Move this to an anonymous namespace at the top of
aberent
2015/03/13 19:04:35
Done.
|
| + content::RenderFrameHost* render_frame_host, |
| + content::MediaPlayersObserver* audio_monitor) { |
| + return new remote_media::RemoteMediaPlayerManager(render_frame_host, |
| + audio_monitor); |
| +} |
| void ChromeMainDelegateAndroid::SandboxInitialized( |
| const std::string& process_type) { |
| @@ -49,5 +58,9 @@ int ChromeMainDelegateAndroid::RunProcess( |
| bool ChromeMainDelegateAndroid::BasicStartupComplete(int* exit_code) { |
| SetChromeSpecificCommandLineFlags(); |
| + |
| + content::BrowserMediaPlayerManager::RegisterFactory( |
| + &CreateRemoteMediaPlayerManager); |
| + |
| return ChromeMainDelegate::BasicStartupComplete(exit_code); |
| } |