| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 | 65 |
| 66 BrowserViewRenderer::CalculateTileMemoryPolicy(); | 66 BrowserViewRenderer::CalculateTileMemoryPolicy(); |
| 67 | 67 |
| 68 // WebView apps can override WebView#computeScroll to achieve custom | 68 // WebView apps can override WebView#computeScroll to achieve custom |
| 69 // scroll/fling. As a result, fling animations may not be ticked, potentially | 69 // scroll/fling. As a result, fling animations may not be ticked, potentially |
| 70 // confusing the tap suppression controller. Simply disable it for WebView. | 70 // confusing the tap suppression controller. Simply disable it for WebView. |
| 71 ui::GestureConfiguration::GetInstance() | 71 ui::GestureConfiguration::GetInstance() |
| 72 ->set_fling_touchscreen_tap_suppression_enabled(false); | 72 ->set_fling_touchscreen_tap_suppression_enabled(false); |
| 73 | 73 |
| 74 base::CommandLine* cl = base::CommandLine::ForCurrentProcess(); | 74 base::CommandLine* cl = base::CommandLine::ForCurrentProcess(); |
| 75 cl->AppendSwitch(switches::kIPCSyncCompositing); | |
| 76 cl->AppendSwitch(cc::switches::kEnableBeginFrameScheduling); | 75 cl->AppendSwitch(cc::switches::kEnableBeginFrameScheduling); |
| 77 | 76 |
| 78 // WebView uses the Android system's scrollbars and overscroll glow. | 77 // WebView uses the Android system's scrollbars and overscroll glow. |
| 79 cl->AppendSwitch(switches::kDisableOverscrollEdgeEffect); | 78 cl->AppendSwitch(switches::kDisableOverscrollEdgeEffect); |
| 80 | 79 |
| 81 // Pull-to-refresh should never be a default WebView action. | 80 // Pull-to-refresh should never be a default WebView action. |
| 82 cl->AppendSwitch(switches::kDisablePullToRefreshEffect); | 81 cl->AppendSwitch(switches::kDisablePullToRefreshEffect); |
| 83 | 82 |
| 84 // Not yet supported in single-process mode. | 83 // Not yet supported in single-process mode. |
| 85 cl->AppendSwitch(switches::kDisableSharedWorkers); | 84 cl->AppendSwitch(switches::kDisableSharedWorkers); |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 #if defined(VIDEO_HOLE) | 252 #if defined(VIDEO_HOLE) |
| 254 content::ExternalVideoSurfaceContainer* | 253 content::ExternalVideoSurfaceContainer* |
| 255 AwMainDelegate::CreateExternalVideoSurfaceContainer( | 254 AwMainDelegate::CreateExternalVideoSurfaceContainer( |
| 256 content::WebContents* web_contents) { | 255 content::WebContents* web_contents) { |
| 257 return external_video_surface::ExternalVideoSurfaceContainerImpl::Create( | 256 return external_video_surface::ExternalVideoSurfaceContainerImpl::Create( |
| 258 web_contents); | 257 web_contents); |
| 259 } | 258 } |
| 260 #endif | 259 #endif |
| 261 | 260 |
| 262 } // namespace android_webview | 261 } // namespace android_webview |
| OLD | NEW |