| 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_media_client_android.h" |
| 10 #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" | 11 #include "android_webview/common/aw_resource.h" |
| 12 #include "base/android/apk_assets.h" | 12 #include "base/android/apk_assets.h" |
| 13 #include "base/android/build_info.h" | 13 #include "base/android/build_info.h" |
| 14 #include "base/android/locale_utils.h" | 14 #include "base/android/locale_utils.h" |
| 15 #include "base/android/memory_pressure_listener_android.h" | 15 #include "base/android/memory_pressure_listener_android.h" |
| 16 #include "base/files/file_path.h" | 16 #include "base/files/file_path.h" |
| 17 #include "base/path_service.h" | 17 #include "base/path_service.h" |
| 18 #include "content/public/browser/render_frame_host.h" |
| 18 #include "content/public/browser/render_process_host.h" | 19 #include "content/public/browser/render_process_host.h" |
| 19 #include "content/public/common/content_client.h" | 20 #include "content/public/common/content_client.h" |
| 20 #include "content/public/common/content_switches.h" | 21 #include "content/public/common/content_switches.h" |
| 21 #include "content/public/common/result_codes.h" | 22 #include "content/public/common/result_codes.h" |
| 22 #include "content/public/common/url_utils.h" | 23 #include "content/public/common/url_utils.h" |
| 23 #include "media/base/android/media_client_android.h" | 24 #include "media/base/android/media_client_android.h" |
| 24 #include "net/android/network_change_notifier_factory_android.h" | 25 #include "net/android/network_change_notifier_factory_android.h" |
| 25 #include "net/base/network_change_notifier.h" | 26 #include "net/base/network_change_notifier.h" |
| 26 #include "ui/base/l10n/l10n_util.h" | 27 #include "ui/base/l10n/l10n_util.h" |
| 27 #include "ui/base/layout.h" | 28 #include "ui/base/layout.h" |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 void AwBrowserMainParts::PreMainMessageLoopRun() { | 102 void AwBrowserMainParts::PreMainMessageLoopRun() { |
| 102 browser_context_->PreMainMessageLoopRun(); | 103 browser_context_->PreMainMessageLoopRun(); |
| 103 | 104 |
| 104 AwDevToolsDiscoveryProvider::Install(); | 105 AwDevToolsDiscoveryProvider::Install(); |
| 105 | 106 |
| 106 media::SetMediaClientAndroid( | 107 media::SetMediaClientAndroid( |
| 107 new AwMediaClientAndroid(AwResource::GetConfigKeySystemUuidMapping())); | 108 new AwMediaClientAndroid(AwResource::GetConfigKeySystemUuidMapping())); |
| 108 | 109 |
| 109 gfx::GLSurface::InitializeOneOff(); | 110 gfx::GLSurface::InitializeOneOff(); |
| 110 | 111 |
| 112 content::RenderFrameHost::AllowInjectingJavaScriptForAndroidWebView(); |
| 113 |
| 111 // This is needed for WebView Classic backwards compatibility | 114 // This is needed for WebView Classic backwards compatibility |
| 112 // See crbug.com/298495 | 115 // See crbug.com/298495 |
| 113 content::SetMaxURLChars(20 * 1024 * 1024); | 116 content::SetMaxURLChars(20 * 1024 * 1024); |
| 114 } | 117 } |
| 115 | 118 |
| 116 bool AwBrowserMainParts::MainMessageLoopRun(int* result_code) { | 119 bool AwBrowserMainParts::MainMessageLoopRun(int* result_code) { |
| 117 // Android WebView does not use default MessageLoop. It has its own | 120 // Android WebView does not use default MessageLoop. It has its own |
| 118 // Android specific MessageLoop. | 121 // Android specific MessageLoop. |
| 119 return true; | 122 return true; |
| 120 } | 123 } |
| 121 | 124 |
| 122 } // namespace android_webview | 125 } // namespace android_webview |
| OLD | NEW |