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_result_codes.h" | 8 #include "android_webview/browser/aw_result_codes.h" |
9 #include "android_webview/native/public/aw_assets.h" | 9 #include "android_webview/native/public/aw_assets.h" |
10 #include "base/android/build_info.h" | 10 #include "base/android/build_info.h" |
11 #include "base/android/locale_utils.h" | 11 #include "base/android/locale_utils.h" |
12 #include "base/android/memory_pressure_listener_android.h" | 12 #include "base/android/memory_pressure_listener_android.h" |
13 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
14 #include "base/path_service.h" | 14 #include "base/path_service.h" |
| 15 #include "components/cdm/browser/widevine_drm_delegate_android.h" |
15 #include "content/public/browser/render_process_host.h" | 16 #include "content/public/browser/render_process_host.h" |
16 #include "content/public/common/content_client.h" | 17 #include "content/public/common/content_client.h" |
17 #include "content/public/common/content_switches.h" | 18 #include "content/public/common/content_switches.h" |
18 #include "content/public/common/result_codes.h" | 19 #include "content/public/common/result_codes.h" |
19 #include "content/public/common/url_utils.h" | 20 #include "content/public/common/url_utils.h" |
20 #include "net/android/network_change_notifier_factory_android.h" | 21 #include "net/android/network_change_notifier_factory_android.h" |
21 #include "net/base/network_change_notifier.h" | 22 #include "net/base/network_change_notifier.h" |
22 #include "ui/base/l10n/l10n_util.h" | 23 #include "ui/base/l10n/l10n_util.h" |
23 #include "ui/base/layout.h" | 24 #include "ui/base/layout.h" |
24 #include "ui/base/resource/resource_bundle.h" | 25 #include "ui/base/resource/resource_bundle.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 base::android::AttachCurrentThread()); | 93 base::android::AttachCurrentThread()); |
93 | 94 |
94 return content::RESULT_CODE_NORMAL_EXIT; | 95 return content::RESULT_CODE_NORMAL_EXIT; |
95 } | 96 } |
96 | 97 |
97 void AwBrowserMainParts::PreMainMessageLoopRun() { | 98 void AwBrowserMainParts::PreMainMessageLoopRun() { |
98 browser_context_->PreMainMessageLoopRun(); | 99 browser_context_->PreMainMessageLoopRun(); |
99 // This is needed for WebView Classic backwards compatibility | 100 // This is needed for WebView Classic backwards compatibility |
100 // See crbug.com/298495 | 101 // See crbug.com/298495 |
101 content::SetMaxURLChars(20 * 1024 * 1024); | 102 content::SetMaxURLChars(20 * 1024 * 1024); |
| 103 cdm::WidevineDrmDelegateAndroid::Install(); |
102 } | 104 } |
103 | 105 |
104 bool AwBrowserMainParts::MainMessageLoopRun(int* result_code) { | 106 bool AwBrowserMainParts::MainMessageLoopRun(int* result_code) { |
105 // Android WebView does not use default MessageLoop. It has its own | 107 // Android WebView does not use default MessageLoop. It has its own |
106 // Android specific MessageLoop. | 108 // Android specific MessageLoop. |
107 return true; | 109 return true; |
108 } | 110 } |
109 | 111 |
110 } // namespace android_webview | 112 } // namespace android_webview |
OLD | NEW |