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/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/hardware_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/common/aw_switches.h" | 11 #include "android_webview/common/aw_switches.h" |
12 #include "android_webview/lib/aw_browser_dependency_factory_impl.h" | 12 #include "android_webview/lib/aw_browser_dependency_factory_impl.h" |
13 #include "android_webview/native/aw_geolocation_permission_context.h" | 13 #include "android_webview/native/aw_geolocation_permission_context.h" |
14 #include "android_webview/native/aw_quota_manager_bridge_impl.h" | 14 #include "android_webview/native/aw_quota_manager_bridge_impl.h" |
15 #include "android_webview/native/aw_web_contents_view_delegate.h" | 15 #include "android_webview/native/aw_web_contents_view_delegate.h" |
16 #include "android_webview/native/aw_web_preferences_populater_impl.h" | 16 #include "android_webview/native/aw_web_preferences_populater_impl.h" |
17 #include "android_webview/renderer/aw_content_renderer_client.h" | 17 #include "android_webview/renderer/aw_content_renderer_client.h" |
18 #include "base/command_line.h" | 18 #include "base/command_line.h" |
19 #include "base/lazy_instance.h" | 19 #include "base/lazy_instance.h" |
(...skipping 26 matching lines...) Expand all Loading... |
46 | 46 |
47 AwMainDelegate::~AwMainDelegate() { | 47 AwMainDelegate::~AwMainDelegate() { |
48 } | 48 } |
49 | 49 |
50 bool AwMainDelegate::BasicStartupComplete(int* exit_code) { | 50 bool AwMainDelegate::BasicStartupComplete(int* exit_code) { |
51 content::SetContentClient(&content_client_); | 51 content::SetContentClient(&content_client_); |
52 | 52 |
53 gpu::InProcessCommandBuffer::SetGpuMemoryBufferFactory( | 53 gpu::InProcessCommandBuffer::SetGpuMemoryBufferFactory( |
54 gpu_memory_buffer_factory_.get()); | 54 gpu_memory_buffer_factory_.get()); |
55 | 55 |
56 InProcessViewRenderer::CalculateTileMemoryPolicy(); | 56 HardwareRenderer::CalculateTileMemoryPolicy(); |
57 | 57 |
58 CommandLine* cl = CommandLine::ForCurrentProcess(); | 58 CommandLine* cl = CommandLine::ForCurrentProcess(); |
59 cl->AppendSwitch(switches::kEnableBeginFrameScheduling); | 59 cl->AppendSwitch(switches::kEnableBeginFrameScheduling); |
60 cl->AppendSwitch(cc::switches::kEnableMapImage); | 60 cl->AppendSwitch(cc::switches::kEnableMapImage); |
61 | 61 |
62 // WebView uses the Android system's scrollbars and overscroll glow. | 62 // WebView uses the Android system's scrollbars and overscroll glow. |
63 cl->AppendSwitch(switches::kHideScrollbars); | 63 cl->AppendSwitch(switches::kHideScrollbars); |
64 cl->AppendSwitch(switches::kDisableOverscrollEdgeEffect); | 64 cl->AppendSwitch(switches::kDisableOverscrollEdgeEffect); |
65 | 65 |
66 // Not yet supported in single-process mode. | 66 // Not yet supported in single-process mode. |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 content::WebContentsViewDelegate* AwMainDelegate::CreateViewDelegate( | 151 content::WebContentsViewDelegate* AwMainDelegate::CreateViewDelegate( |
152 content::WebContents* web_contents) { | 152 content::WebContents* web_contents) { |
153 return AwWebContentsViewDelegate::Create(web_contents); | 153 return AwWebContentsViewDelegate::Create(web_contents); |
154 } | 154 } |
155 | 155 |
156 AwWebPreferencesPopulater* AwMainDelegate::CreateWebPreferencesPopulater() { | 156 AwWebPreferencesPopulater* AwMainDelegate::CreateWebPreferencesPopulater() { |
157 return new AwWebPreferencesPopulaterImpl(); | 157 return new AwWebPreferencesPopulaterImpl(); |
158 } | 158 } |
159 | 159 |
160 } // namespace android_webview | 160 } // namespace android_webview |
OLD | NEW |