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

Side by Side Diff: chrome/browser/chrome_browser_main_android.cc

Issue 2063123002: media: Call SetMediaClientAndroid() in content for browser process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chrome_browser_main_android.h" 5 #include "chrome/browser/chrome_browser_main_android.h"
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
11 #include "base/path_service.h" 11 #include "base/path_service.h"
12 #include "base/trace_event/trace_event.h" 12 #include "base/trace_event/trace_event.h"
13 #include "chrome/browser/android/seccomp_support_detector.h" 13 #include "chrome/browser/android/seccomp_support_detector.h"
14 #include "chrome/browser/signin/signin_manager_factory.h" 14 #include "chrome/browser/signin/signin_manager_factory.h"
15 #include "chrome/common/chrome_media_client_android.h"
16 #include "chrome/common/chrome_paths.h" 15 #include "chrome/common/chrome_paths.h"
17 #include "components/crash/content/app/breakpad_linux.h" 16 #include "components/crash/content/app/breakpad_linux.h"
18 #include "components/crash/content/browser/crash_dump_manager_android.h" 17 #include "components/crash/content/browser/crash_dump_manager_android.h"
19 #include "components/signin/core/browser/signin_manager.h" 18 #include "components/signin/core/browser/signin_manager.h"
20 #include "content/public/browser/android/compositor.h" 19 #include "content/public/browser/android/compositor.h"
21 #include "content/public/browser/browser_thread.h" 20 #include "content/public/browser/browser_thread.h"
22 #include "content/public/common/main_function_params.h" 21 #include "content/public/common/main_function_params.h"
23 #include "media/base/android/media_client_android.h"
24 #include "net/android/network_change_notifier_factory_android.h" 22 #include "net/android/network_change_notifier_factory_android.h"
25 #include "net/base/network_change_notifier.h" 23 #include "net/base/network_change_notifier.h"
26 #include "ui/base/resource/resource_bundle_android.h" 24 #include "ui/base/resource/resource_bundle_android.h"
27 #include "ui/base/ui_base_paths.h" 25 #include "ui/base/ui_base_paths.h"
28 26
29 namespace { 27 namespace {
30 28
31 void DeleteFileTask( 29 void DeleteFileTask(
32 const base::FilePath& file_path) { 30 const base::FilePath& file_path) {
33 if (base::PathExists(file_path)) 31 if (base::PathExists(file_path))
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 110
113 { 111 {
114 TRACE_EVENT0("startup", 112 TRACE_EVENT0("startup",
115 "ChromeBrowserMainPartsAndroid::PreEarlyInitialization:StartUiMsgLoop"); 113 "ChromeBrowserMainPartsAndroid::PreEarlyInitialization:StartUiMsgLoop");
116 base::MessageLoopForUI::current()->Start(); 114 base::MessageLoopForUI::current()->Start();
117 } 115 }
118 116
119 ChromeBrowserMainParts::PreEarlyInitialization(); 117 ChromeBrowserMainParts::PreEarlyInitialization();
120 } 118 }
121 119
122 void ChromeBrowserMainPartsAndroid::PreMainMessageLoopRun() { 120 void ChromeBrowserMainPartsAndroid::PreMainMessageLoopRun() {
Lei Zhang 2016/06/14 23:38:50 You can get rid of this altogether if all it's doi
xhwang 2016/06/15 00:31:52 Done.
123 media::SetMediaClientAndroid(new ChromeMediaClientAndroid);
124
125 ChromeBrowserMainParts::PreMainMessageLoopRun(); 121 ChromeBrowserMainParts::PreMainMessageLoopRun();
126 } 122 }
127 123
128 void ChromeBrowserMainPartsAndroid::PostBrowserStart() { 124 void ChromeBrowserMainPartsAndroid::PostBrowserStart() {
129 ChromeBrowserMainParts::PostBrowserStart(); 125 ChromeBrowserMainParts::PostBrowserStart();
130 126
131 content::BrowserThread::GetBlockingPool()->PostDelayedTask(FROM_HERE, 127 content::BrowserThread::GetBlockingPool()->PostDelayedTask(FROM_HERE,
132 base::Bind(&SeccompSupportDetector::StartDetection), 128 base::Bind(&SeccompSupportDetector::StartDetection),
133 base::TimeDelta::FromMinutes(1)); 129 base::TimeDelta::FromMinutes(1));
134 } 130 }
135 131
136 void ChromeBrowserMainPartsAndroid::ShowMissingLocaleMessageBox() { 132 void ChromeBrowserMainPartsAndroid::ShowMissingLocaleMessageBox() {
137 NOTREACHED(); 133 NOTREACHED();
138 } 134 }
OLDNEW
« no previous file with comments | « android_webview/browser/aw_browser_main_parts.cc ('k') | chromecast/browser/cast_browser_main_parts.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698