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

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

Issue 1497743005: Allow huge data: URIs only via WebView.loadDataWithBaseUrl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed the test Created 5 years 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
« no previous file with comments | « no previous file | android_webview/java/src/org/chromium/android_webview/AwContents.java » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_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/browser/deferred_gpu_command_service.h" 11 #include "android_webview/browser/deferred_gpu_command_service.h"
12 #include "android_webview/common/aw_resource.h" 12 #include "android_webview/common/aw_resource.h"
13 #include "android_webview/common/aw_switches.h" 13 #include "android_webview/common/aw_switches.h"
14 #include "base/android/apk_assets.h" 14 #include "base/android/apk_assets.h"
15 #include "base/android/build_info.h" 15 #include "base/android/build_info.h"
16 #include "base/android/locale_utils.h" 16 #include "base/android/locale_utils.h"
17 #include "base/android/memory_pressure_listener_android.h" 17 #include "base/android/memory_pressure_listener_android.h"
18 #include "base/command_line.h" 18 #include "base/command_line.h"
19 #include "base/files/file_path.h" 19 #include "base/files/file_path.h"
20 #include "base/path_service.h" 20 #include "base/path_service.h"
21 #include "content/public/browser/android/synchronous_compositor.h" 21 #include "content/public/browser/android/synchronous_compositor.h"
22 #include "content/public/browser/render_frame_host.h" 22 #include "content/public/browser/render_frame_host.h"
23 #include "content/public/browser/render_process_host.h" 23 #include "content/public/browser/render_process_host.h"
24 #include "content/public/common/content_client.h" 24 #include "content/public/common/content_client.h"
25 #include "content/public/common/content_switches.h" 25 #include "content/public/common/content_switches.h"
26 #include "content/public/common/result_codes.h" 26 #include "content/public/common/result_codes.h"
27 #include "content/public/common/url_utils.h"
28 #include "media/base/android/media_client_android.h" 27 #include "media/base/android/media_client_android.h"
29 #include "net/android/network_change_notifier_factory_android.h" 28 #include "net/android/network_change_notifier_factory_android.h"
30 #include "net/base/network_change_notifier.h" 29 #include "net/base/network_change_notifier.h"
31 #include "ui/base/l10n/l10n_util.h" 30 #include "ui/base/l10n/l10n_util.h"
32 #include "ui/base/layout.h" 31 #include "ui/base/layout.h"
33 #include "ui/base/resource/resource_bundle.h" 32 #include "ui/base/resource/resource_bundle.h"
34 #include "ui/base/resource/resource_bundle_android.h" 33 #include "ui/base/resource/resource_bundle_android.h"
35 #include "ui/base/ui_base_paths.h" 34 #include "ui/base/ui_base_paths.h"
36 #include "ui/gl/gl_surface.h" 35 #include "ui/gl/gl_surface.h"
37 36
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 81
83 void AwBrowserMainParts::PreMainMessageLoopRun() { 82 void AwBrowserMainParts::PreMainMessageLoopRun() {
84 browser_context_->PreMainMessageLoopRun(); 83 browser_context_->PreMainMessageLoopRun();
85 84
86 AwDevToolsDiscoveryProvider::Install(); 85 AwDevToolsDiscoveryProvider::Install();
87 86
88 media::SetMediaClientAndroid( 87 media::SetMediaClientAndroid(
89 new AwMediaClientAndroid(AwResource::GetConfigKeySystemUuidMapping())); 88 new AwMediaClientAndroid(AwResource::GetConfigKeySystemUuidMapping()));
90 89
91 content::RenderFrameHost::AllowInjectingJavaScriptForAndroidWebView(); 90 content::RenderFrameHost::AllowInjectingJavaScriptForAndroidWebView();
92
93 // This is needed for WebView Classic backwards compatibility
94 // See crbug.com/298495. Also see crbug.com/525697 on why it is currently
95 // for single process mode only.
96 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
97 switches::kSingleProcess)) {
98 content::SetMaxURLChars(20 * 1024 * 1024);
99 }
100 } 91 }
101 92
102 bool AwBrowserMainParts::MainMessageLoopRun(int* result_code) { 93 bool AwBrowserMainParts::MainMessageLoopRun(int* result_code) {
103 // Android WebView does not use default MessageLoop. It has its own 94 // Android WebView does not use default MessageLoop. It has its own
104 // Android specific MessageLoop. 95 // Android specific MessageLoop.
105 return true; 96 return true;
106 } 97 }
107 98
108 } // namespace android_webview 99 } // namespace android_webview
OLDNEW
« no previous file with comments | « no previous file | android_webview/java/src/org/chromium/android_webview/AwContents.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698