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

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

Issue 962793005: Adds MediaClientAndroid to support embedder/MediaDrmBridge interaction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: overhaul: creates MediaClientAndroid (browser-side client), eliminates Java-based MediaDrmBridge ke… Created 5 years, 8 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/command_line.h" 7 #include "base/command_line.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/trace_event/trace_event.h" 9 #include "base/trace_event/trace_event.h"
10 #include "chrome/browser/android/chrome_media_client_android.h"
10 #include "chrome/browser/android/seccomp_support_detector.h" 11 #include "chrome/browser/android/seccomp_support_detector.h"
11 #include "chrome/browser/google/google_search_counter_android.h" 12 #include "chrome/browser/google/google_search_counter_android.h"
12 #include "chrome/browser/signin/signin_manager_factory.h" 13 #include "chrome/browser/signin/signin_manager_factory.h"
13 #include "chrome/common/chrome_paths.h" 14 #include "chrome/common/chrome_paths.h"
14 #include "chrome/common/chrome_switches.h" 15 #include "chrome/common/chrome_switches.h"
15 #include "components/crash/app/breakpad_linux.h" 16 #include "components/crash/app/breakpad_linux.h"
16 #include "components/crash/browser/crash_dump_manager_android.h" 17 #include "components/crash/browser/crash_dump_manager_android.h"
17 #include "components/signin/core/browser/signin_manager.h" 18 #include "components/signin/core/browser/signin_manager.h"
18 #include "content/public/browser/android/compositor.h" 19 #include "content/public/browser/android/compositor.h"
19 #include "content/public/browser/browser_thread.h" 20 #include "content/public/browser/browser_thread.h"
20 #include "content/public/common/main_function_params.h" 21 #include "content/public/common/main_function_params.h"
22 #include "media/base/android/media_client_android.h"
21 #include "net/android/network_change_notifier_factory_android.h" 23 #include "net/android/network_change_notifier_factory_android.h"
22 #include "net/base/network_change_notifier.h" 24 #include "net/base/network_change_notifier.h"
23 #include "ui/base/ui_base_paths.h" 25 #include "ui/base/ui_base_paths.h"
24 26
25 ChromeBrowserMainPartsAndroid::ChromeBrowserMainPartsAndroid( 27 ChromeBrowserMainPartsAndroid::ChromeBrowserMainPartsAndroid(
26 const content::MainFunctionParams& parameters) 28 const content::MainFunctionParams& parameters)
27 : ChromeBrowserMainParts(parameters) { 29 : ChromeBrowserMainParts(parameters) {
28 } 30 }
29 31
30 ChromeBrowserMainPartsAndroid::~ChromeBrowserMainPartsAndroid() { 32 ChromeBrowserMainPartsAndroid::~ChromeBrowserMainPartsAndroid() {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 ChromeBrowserMainParts::PostProfileInit(); 69 ChromeBrowserMainParts::PostProfileInit();
68 } 70 }
69 71
70 void ChromeBrowserMainPartsAndroid::PreEarlyInitialization() { 72 void ChromeBrowserMainPartsAndroid::PreEarlyInitialization() {
71 TRACE_EVENT0("startup", 73 TRACE_EVENT0("startup",
72 "ChromeBrowserMainPartsAndroid::PreEarlyInitialization") 74 "ChromeBrowserMainPartsAndroid::PreEarlyInitialization")
73 net::NetworkChangeNotifier::SetFactory( 75 net::NetworkChangeNotifier::SetFactory(
74 new net::NetworkChangeNotifierFactoryAndroid()); 76 new net::NetworkChangeNotifierFactoryAndroid());
75 77
76 content::Compositor::Initialize(); 78 content::Compositor::Initialize();
79 media::SetMediaClientAndroid(new ChromeMediaClientAndroid);
xhwang 2015/04/24 04:52:23 nit: Here and throughout the CL, usually we use ne
gunsch 2015/04/27 23:44:11 Done. (TIL! Thanks for the link.)
77 80
78 // Chrome on Android does not use default MessageLoop. It has its own 81 // Chrome on Android does not use default MessageLoop. It has its own
79 // Android specific MessageLoop. 82 // Android specific MessageLoop.
80 DCHECK(!main_message_loop_.get()); 83 DCHECK(!main_message_loop_.get());
81 84
82 // Create and start the MessageLoop. 85 // Create and start the MessageLoop.
83 // This is a critical point in the startup process. 86 // This is a critical point in the startup process.
84 { 87 {
85 TRACE_EVENT0("startup", 88 TRACE_EVENT0("startup",
86 "ChromeBrowserMainPartsAndroid::PreEarlyInitialization:CreateUiMsgLoop"); 89 "ChromeBrowserMainPartsAndroid::PreEarlyInitialization:CreateUiMsgLoop");
(...skipping 13 matching lines...) Expand all
100 ChromeBrowserMainParts::PostBrowserStart(); 103 ChromeBrowserMainParts::PostBrowserStart();
101 104
102 content::BrowserThread::GetBlockingPool()->PostDelayedTask(FROM_HERE, 105 content::BrowserThread::GetBlockingPool()->PostDelayedTask(FROM_HERE,
103 base::Bind(&SeccompSupportDetector::StartDetection), 106 base::Bind(&SeccompSupportDetector::StartDetection),
104 base::TimeDelta::FromMinutes(1)); 107 base::TimeDelta::FromMinutes(1));
105 } 108 }
106 109
107 void ChromeBrowserMainPartsAndroid::ShowMissingLocaleMessageBox() { 110 void ChromeBrowserMainPartsAndroid::ShowMissingLocaleMessageBox() {
108 NOTREACHED(); 111 NOTREACHED();
109 } 112 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698