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

Side by Side Diff: android_webview/browser/aw_browser_main_parts.cc

Issue 962793005: Adds MediaClientAndroid to support embedder/MediaDrmBridge interaction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: added components/cdm OWNERS to components/cdm.gypi (per-file) Created 5 years, 7 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 "android_webview/browser/aw_browser_main_parts.h" 5 #include "android_webview/browser/aw_browser_main_parts.h"
6 6
7 #include "android_webview/browser/aw_browser_context.h" 7 #include "android_webview/browser/aw_browser_context.h"
8 #include "android_webview/browser/aw_dev_tools_discovery_provider.h" 8 #include "android_webview/browser/aw_dev_tools_discovery_provider.h"
9 #include "android_webview/browser/aw_media_client_android.h"
9 #include "android_webview/browser/aw_result_codes.h" 10 #include "android_webview/browser/aw_result_codes.h"
11 #include "android_webview/common/aw_resource.h"
boliu 2015/04/29 19:24:25 include not necessary?
gunsch 2015/04/29 20:29:43 Necessary for AwResource::GetConfigKeySystemUuidMa
10 #include "android_webview/native/public/aw_assets.h" 12 #include "android_webview/native/public/aw_assets.h"
11 #include "base/android/build_info.h" 13 #include "base/android/build_info.h"
12 #include "base/android/locale_utils.h" 14 #include "base/android/locale_utils.h"
13 #include "base/android/memory_pressure_listener_android.h" 15 #include "base/android/memory_pressure_listener_android.h"
14 #include "base/files/file_path.h" 16 #include "base/files/file_path.h"
15 #include "base/path_service.h" 17 #include "base/path_service.h"
16 #include "components/devtools_discovery/devtools_discovery_manager.h" 18 #include "components/devtools_discovery/devtools_discovery_manager.h"
17 #include "content/public/browser/render_process_host.h" 19 #include "content/public/browser/render_process_host.h"
18 #include "content/public/common/content_client.h" 20 #include "content/public/common/content_client.h"
19 #include "content/public/common/content_switches.h" 21 #include "content/public/common/content_switches.h"
20 #include "content/public/common/result_codes.h" 22 #include "content/public/common/result_codes.h"
21 #include "content/public/common/url_utils.h" 23 #include "content/public/common/url_utils.h"
24 #include "media/base/android/media_client_android.h"
22 #include "net/android/network_change_notifier_factory_android.h" 25 #include "net/android/network_change_notifier_factory_android.h"
23 #include "net/base/network_change_notifier.h" 26 #include "net/base/network_change_notifier.h"
24 #include "ui/base/l10n/l10n_util.h" 27 #include "ui/base/l10n/l10n_util.h"
25 #include "ui/base/layout.h" 28 #include "ui/base/layout.h"
26 #include "ui/base/resource/resource_bundle.h" 29 #include "ui/base/resource/resource_bundle.h"
27 #include "ui/base/ui_base_paths.h" 30 #include "ui/base/ui_base_paths.h"
28 31
29 namespace android_webview { 32 namespace android_webview {
30 33
31 AwBrowserMainParts::AwBrowserMainParts(AwBrowserContext* browser_context) 34 AwBrowserMainParts::AwBrowserMainParts(AwBrowserContext* browser_context)
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 } 96 }
94 97
95 void AwBrowserMainParts::PreMainMessageLoopRun() { 98 void AwBrowserMainParts::PreMainMessageLoopRun() {
96 browser_context_->PreMainMessageLoopRun(); 99 browser_context_->PreMainMessageLoopRun();
97 100
98 devtools_discovery::DevToolsDiscoveryManager* discovery_manager = 101 devtools_discovery::DevToolsDiscoveryManager* discovery_manager =
99 devtools_discovery::DevToolsDiscoveryManager::GetInstance(); 102 devtools_discovery::DevToolsDiscoveryManager::GetInstance();
100 discovery_manager->AddProvider(make_scoped_ptr( 103 discovery_manager->AddProvider(make_scoped_ptr(
101 new AwDevToolsDiscoveryProvider())); 104 new AwDevToolsDiscoveryProvider()));
102 105
106 media::SetMediaClientAndroid(
107 new AwMediaClientAndroid(AwResource::GetConfigKeySystemUuidMapping()));
boliu 2015/04/29 19:24:25 So chrome does this in PreEarlyInitialization, and
gunsch 2015/04/29 20:29:43 Sure, updated Chrome to do this in PreMainMessageL
108
103 // This is needed for WebView Classic backwards compatibility 109 // This is needed for WebView Classic backwards compatibility
104 // See crbug.com/298495 110 // See crbug.com/298495
105 content::SetMaxURLChars(20 * 1024 * 1024); 111 content::SetMaxURLChars(20 * 1024 * 1024);
106 } 112 }
107 113
108 bool AwBrowserMainParts::MainMessageLoopRun(int* result_code) { 114 bool AwBrowserMainParts::MainMessageLoopRun(int* result_code) {
109 // Android WebView does not use default MessageLoop. It has its own 115 // Android WebView does not use default MessageLoop. It has its own
110 // Android specific MessageLoop. 116 // Android specific MessageLoop.
111 return true; 117 return true;
112 } 118 }
113 119
114 } // namespace android_webview 120 } // namespace android_webview
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698