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 <memory> | 7 #include <memory> |
8 | 8 |
9 #include "android_webview/browser/aw_content_browser_client.h" | 9 #include "android_webview/browser/aw_content_browser_client.h" |
10 #include "android_webview/browser/browser_view_renderer.h" | 10 #include "android_webview/browser/browser_view_renderer.h" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 | 67 |
68 BrowserViewRenderer::CalculateTileMemoryPolicy(); | 68 BrowserViewRenderer::CalculateTileMemoryPolicy(); |
69 | 69 |
70 // WebView apps can override WebView#computeScroll to achieve custom | 70 // WebView apps can override WebView#computeScroll to achieve custom |
71 // scroll/fling. As a result, fling animations may not be ticked, potentially | 71 // scroll/fling. As a result, fling animations may not be ticked, potentially |
72 // confusing the tap suppression controller. Simply disable it for WebView. | 72 // confusing the tap suppression controller. Simply disable it for WebView. |
73 ui::GestureConfiguration::GetInstance() | 73 ui::GestureConfiguration::GetInstance() |
74 ->set_fling_touchscreen_tap_suppression_enabled(false); | 74 ->set_fling_touchscreen_tap_suppression_enabled(false); |
75 | 75 |
76 base::CommandLine* cl = base::CommandLine::ForCurrentProcess(); | 76 base::CommandLine* cl = base::CommandLine::ForCurrentProcess(); |
| 77 cl->AppendSwitch(cc::switches::kEnableBeginFrameScheduling); |
77 | 78 |
78 // WebView uses the Android system's scrollbars and overscroll glow. | 79 // WebView uses the Android system's scrollbars and overscroll glow. |
79 cl->AppendSwitch(switches::kDisableOverscrollEdgeEffect); | 80 cl->AppendSwitch(switches::kDisableOverscrollEdgeEffect); |
80 | 81 |
81 // Pull-to-refresh should never be a default WebView action. | 82 // Pull-to-refresh should never be a default WebView action. |
82 cl->AppendSwitch(switches::kDisablePullToRefreshEffect); | 83 cl->AppendSwitch(switches::kDisablePullToRefreshEffect); |
83 | 84 |
84 // Not yet supported in single-process mode. | 85 // Not yet supported in single-process mode. |
85 cl->AppendSwitch(switches::kDisableSharedWorkers); | 86 cl->AppendSwitch(switches::kDisableSharedWorkers); |
86 | 87 |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 #if defined(VIDEO_HOLE) | 263 #if defined(VIDEO_HOLE) |
263 content::ExternalVideoSurfaceContainer* | 264 content::ExternalVideoSurfaceContainer* |
264 AwMainDelegate::CreateExternalVideoSurfaceContainer( | 265 AwMainDelegate::CreateExternalVideoSurfaceContainer( |
265 content::WebContents* web_contents) { | 266 content::WebContents* web_contents) { |
266 return external_video_surface::ExternalVideoSurfaceContainerImpl::Create( | 267 return external_video_surface::ExternalVideoSurfaceContainerImpl::Create( |
267 web_contents); | 268 web_contents); |
268 } | 269 } |
269 #endif | 270 #endif |
270 | 271 |
271 } // namespace android_webview | 272 } // namespace android_webview |
OLD | NEW |