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

Side by Side Diff: android_webview/lib/main/aw_main_delegate.cc

Issue 112053002: Allow the max url length to be overridden (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Wrapping the setting in OS_ANDROID ifdef Created 7 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 | Annotate | Revision Log
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/lib/main/aw_main_delegate.h" 5 #include "android_webview/lib/main/aw_main_delegate.h"
6 6
7 #include "android_webview/browser/aw_content_browser_client.h" 7 #include "android_webview/browser/aw_content_browser_client.h"
8 #include "android_webview/browser/gpu_memory_buffer_factory_impl.h" 8 #include "android_webview/browser/gpu_memory_buffer_factory_impl.h"
9 #include "android_webview/browser/in_process_view_renderer.h" 9 #include "android_webview/browser/in_process_view_renderer.h"
10 #include "android_webview/browser/scoped_allow_wait_for_legacy_web_view_api.h" 10 #include "android_webview/browser/scoped_allow_wait_for_legacy_web_view_api.h"
11 #include "android_webview/lib/aw_browser_dependency_factory_impl.h" 11 #include "android_webview/lib/aw_browser_dependency_factory_impl.h"
12 #include "android_webview/native/aw_geolocation_permission_context.h" 12 #include "android_webview/native/aw_geolocation_permission_context.h"
13 #include "android_webview/native/aw_quota_manager_bridge_impl.h" 13 #include "android_webview/native/aw_quota_manager_bridge_impl.h"
14 #include "android_webview/native/aw_web_contents_view_delegate.h" 14 #include "android_webview/native/aw_web_contents_view_delegate.h"
15 #include "android_webview/native/aw_web_preferences_populater_impl.h" 15 #include "android_webview/native/aw_web_preferences_populater_impl.h"
16 #include "android_webview/renderer/aw_content_renderer_client.h" 16 #include "android_webview/renderer/aw_content_renderer_client.h"
17 #include "base/command_line.h" 17 #include "base/command_line.h"
18 #include "base/lazy_instance.h" 18 #include "base/lazy_instance.h"
19 #include "base/logging.h" 19 #include "base/logging.h"
20 #include "base/memory/scoped_ptr.h" 20 #include "base/memory/scoped_ptr.h"
21 #include "base/threading/thread_restrictions.h" 21 #include "base/threading/thread_restrictions.h"
22 #include "cc/base/switches.h" 22 #include "cc/base/switches.h"
23 #include "content/public/browser/browser_main_runner.h" 23 #include "content/public/browser/browser_main_runner.h"
24 #include "content/public/browser/browser_thread.h" 24 #include "content/public/browser/browser_thread.h"
25 #include "content/public/common/content_switches.h" 25 #include "content/public/common/content_switches.h"
26 #include "content/public/common/url_utils.h"
26 #include "gpu/command_buffer/client/gl_in_process_context.h" 27 #include "gpu/command_buffer/client/gl_in_process_context.h"
27 #include "gpu/command_buffer/service/in_process_command_buffer.h" 28 #include "gpu/command_buffer/service/in_process_command_buffer.h"
28 #include "webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl. h" 29 #include "webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl. h"
29 30
30 namespace android_webview { 31 namespace android_webview {
31 32
32 namespace { 33 namespace {
33 34
34 // TODO(boliu): Remove this global Allow once the underlying issues are 35 // TODO(boliu): Remove this global Allow once the underlying issues are
35 // resolved - http://crbug.com/240453. See AwMainDelegate::RunProcess below. 36 // resolved - http://crbug.com/240453. See AwMainDelegate::RunProcess below.
36 base::LazyInstance<scoped_ptr<ScopedAllowWaitForLegacyWebViewApi> > 37 base::LazyInstance<scoped_ptr<ScopedAllowWaitForLegacyWebViewApi> >
37 g_allow_wait_in_ui_thread = LAZY_INSTANCE_INITIALIZER; 38 g_allow_wait_in_ui_thread = LAZY_INSTANCE_INITIALIZER;
38 39
39 } 40 }
40 41
41 AwMainDelegate::AwMainDelegate() 42 AwMainDelegate::AwMainDelegate()
42 : gpu_memory_buffer_factory_(new GpuMemoryBufferFactoryImpl) { 43 : gpu_memory_buffer_factory_(new GpuMemoryBufferFactoryImpl) {
43 } 44 }
44 45
45 AwMainDelegate::~AwMainDelegate() { 46 AwMainDelegate::~AwMainDelegate() {
46 } 47 }
47 48
48 bool AwMainDelegate::BasicStartupComplete(int* exit_code) { 49 bool AwMainDelegate::BasicStartupComplete(int* exit_code) {
49 content::SetContentClient(&content_client_); 50 content::SetContentClient(&content_client_);
50 51
52 // This is needed for WebView Classic backwards compatibility
53 // See crbug.com/298495
54 content::SetMaxURLChars(20 * 1024 * 1024);
55
51 gpu::InProcessCommandBuffer::SetGpuMemoryBufferFactory( 56 gpu::InProcessCommandBuffer::SetGpuMemoryBufferFactory(
52 gpu_memory_buffer_factory_.get()); 57 gpu_memory_buffer_factory_.get());
53 gpu::InProcessCommandBuffer::EnableVirtualizedContext(); 58 gpu::InProcessCommandBuffer::EnableVirtualizedContext();
54 59
55 InProcessViewRenderer::CalculateTileMemoryPolicy(); 60 InProcessViewRenderer::CalculateTileMemoryPolicy();
56 61
57 CommandLine* cl = CommandLine::ForCurrentProcess(); 62 CommandLine* cl = CommandLine::ForCurrentProcess();
58 cl->AppendSwitch(switches::kEnableBeginFrameScheduling); 63 cl->AppendSwitch(switches::kEnableBeginFrameScheduling);
59 cl->AppendSwitch(cc::switches::kEnableMapImage); 64 cl->AppendSwitch(cc::switches::kEnableMapImage);
60 65
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 content::WebContentsViewDelegate* AwMainDelegate::CreateViewDelegate( 148 content::WebContentsViewDelegate* AwMainDelegate::CreateViewDelegate(
144 content::WebContents* web_contents) { 149 content::WebContents* web_contents) {
145 return AwWebContentsViewDelegate::Create(web_contents); 150 return AwWebContentsViewDelegate::Create(web_contents);
146 } 151 }
147 152
148 AwWebPreferencesPopulater* AwMainDelegate::CreateWebPreferencesPopulater() { 153 AwWebPreferencesPopulater* AwMainDelegate::CreateWebPreferencesPopulater() {
149 return new AwWebPreferencesPopulaterImpl(); 154 return new AwWebPreferencesPopulaterImpl();
150 } 155 }
151 156
152 } // namespace android_webview 157 } // namespace android_webview
OLDNEW
« no previous file with comments | « no previous file | content/browser/web_contents/web_contents_impl.cc » ('j') | content/public/common/content_constants.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698