OLD | NEW |
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" |
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 "content/public/browser/render_process_host.h" | 18 #include "content/public/browser/render_process_host.h" |
17 #include "content/public/common/content_client.h" | 19 #include "content/public/common/content_client.h" |
18 #include "content/public/common/content_switches.h" | 20 #include "content/public/common/content_switches.h" |
19 #include "content/public/common/result_codes.h" | 21 #include "content/public/common/result_codes.h" |
20 #include "content/public/common/url_utils.h" | 22 #include "content/public/common/url_utils.h" |
| 23 #include "media/base/android/media_client_android.h" |
21 #include "net/android/network_change_notifier_factory_android.h" | 24 #include "net/android/network_change_notifier_factory_android.h" |
22 #include "net/base/network_change_notifier.h" | 25 #include "net/base/network_change_notifier.h" |
23 #include "ui/base/l10n/l10n_util.h" | 26 #include "ui/base/l10n/l10n_util.h" |
24 #include "ui/base/layout.h" | 27 #include "ui/base/layout.h" |
25 #include "ui/base/resource/resource_bundle.h" | 28 #include "ui/base/resource/resource_bundle.h" |
26 #include "ui/base/ui_base_paths.h" | 29 #include "ui/base/ui_base_paths.h" |
27 | 30 |
28 namespace android_webview { | 31 namespace android_webview { |
29 | 32 |
30 AwBrowserMainParts::AwBrowserMainParts(AwBrowserContext* browser_context) | 33 AwBrowserMainParts::AwBrowserMainParts(AwBrowserContext* browser_context) |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 base::android::AttachCurrentThread()); | 92 base::android::AttachCurrentThread()); |
90 | 93 |
91 return content::RESULT_CODE_NORMAL_EXIT; | 94 return content::RESULT_CODE_NORMAL_EXIT; |
92 } | 95 } |
93 | 96 |
94 void AwBrowserMainParts::PreMainMessageLoopRun() { | 97 void AwBrowserMainParts::PreMainMessageLoopRun() { |
95 browser_context_->PreMainMessageLoopRun(); | 98 browser_context_->PreMainMessageLoopRun(); |
96 | 99 |
97 AwDevToolsDiscoveryProvider::Install(); | 100 AwDevToolsDiscoveryProvider::Install(); |
98 | 101 |
| 102 media::SetMediaClientAndroid( |
| 103 new AwMediaClientAndroid(AwResource::GetConfigKeySystemUuidMapping())); |
| 104 |
99 // This is needed for WebView Classic backwards compatibility | 105 // This is needed for WebView Classic backwards compatibility |
100 // See crbug.com/298495 | 106 // See crbug.com/298495 |
101 content::SetMaxURLChars(20 * 1024 * 1024); | 107 content::SetMaxURLChars(20 * 1024 * 1024); |
102 } | 108 } |
103 | 109 |
104 bool AwBrowserMainParts::MainMessageLoopRun(int* result_code) { | 110 bool AwBrowserMainParts::MainMessageLoopRun(int* result_code) { |
105 // Android WebView does not use default MessageLoop. It has its own | 111 // Android WebView does not use default MessageLoop. It has its own |
106 // Android specific MessageLoop. | 112 // Android specific MessageLoop. |
107 return true; | 113 return true; |
108 } | 114 } |
109 | 115 |
110 } // namespace android_webview | 116 } // namespace android_webview |
OLD | NEW |