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/scoped_allow_wait_for_legacy_web_view_api.h" | 9 #include "android_webview/browser/scoped_allow_wait_for_legacy_web_view_api.h" |
10 #include "android_webview/lib/aw_browser_dependency_factory_impl.h" | 10 #include "android_webview/lib/aw_browser_dependency_factory_impl.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 gpu_memory_buffer_factory_.get()); | 50 gpu_memory_buffer_factory_.get()); |
51 | 51 |
52 CommandLine* cl = CommandLine::ForCurrentProcess(); | 52 CommandLine* cl = CommandLine::ForCurrentProcess(); |
53 cl->AppendSwitch(switches::kEnableBeginFrameScheduling); | 53 cl->AppendSwitch(switches::kEnableBeginFrameScheduling); |
54 if (!cl->HasSwitch("disable-map-image")) | 54 if (!cl->HasSwitch("disable-map-image")) |
55 cl->AppendSwitch(cc::switches::kUseMapImage); | 55 cl->AppendSwitch(cc::switches::kUseMapImage); |
56 | 56 |
57 // WebView uses the Android system's scrollbars and overscroll glow. | 57 // WebView uses the Android system's scrollbars and overscroll glow. |
58 cl->AppendSwitch(switches::kHideScrollbars); | 58 cl->AppendSwitch(switches::kHideScrollbars); |
59 cl->AppendSwitch(switches::kDisableOverscrollEdgeEffect); | 59 cl->AppendSwitch(switches::kDisableOverscrollEdgeEffect); |
| 60 // WebView handles fling gestures Java-side. |
| 61 cl->AppendSwitch(switches::kIgnoreRootLayerFlings); |
60 | 62 |
61 return false; | 63 return false; |
62 } | 64 } |
63 | 65 |
64 void AwMainDelegate::PreSandboxStartup() { | 66 void AwMainDelegate::PreSandboxStartup() { |
65 // TODO(torne): When we have a separate renderer process, we need to handle | 67 // TODO(torne): When we have a separate renderer process, we need to handle |
66 // being passed open FDs for the resource paks here. | 68 // being passed open FDs for the resource paks here. |
67 } | 69 } |
68 | 70 |
69 void AwMainDelegate::SandboxInitialized(const std::string& process_type) { | 71 void AwMainDelegate::SandboxInitialized(const std::string& process_type) { |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 AwBrowserContext* browser_context) { | 121 AwBrowserContext* browser_context) { |
120 return AwGeolocationPermissionContext::Create(browser_context); | 122 return AwGeolocationPermissionContext::Create(browser_context); |
121 } | 123 } |
122 | 124 |
123 content::WebContentsViewDelegate* AwMainDelegate::CreateViewDelegate( | 125 content::WebContentsViewDelegate* AwMainDelegate::CreateViewDelegate( |
124 content::WebContents* web_contents) { | 126 content::WebContents* web_contents) { |
125 return AwWebContentsViewDelegate::Create(web_contents); | 127 return AwWebContentsViewDelegate::Create(web_contents); |
126 } | 128 } |
127 | 129 |
128 } // namespace android_webview | 130 } // namespace android_webview |
OLD | NEW |