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

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

Issue 1262403005: Use ui::GestureConfiguration to disable tap suppression in Android WebView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 months 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
« no previous file with comments | « android_webview/lib/DEPS ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/browser_view_renderer.h" 8 #include "android_webview/browser/browser_view_renderer.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/common/aw_switches.h" 10 #include "android_webview/common/aw_switches.h"
(...skipping 17 matching lines...) Expand all
28 #include "components/external_video_surface/browser/android/external_video_surfa ce_container_impl.h" 28 #include "components/external_video_surface/browser/android/external_video_surfa ce_container_impl.h"
29 #include "content/public/browser/android/browser_media_player_manager_register.h " 29 #include "content/public/browser/android/browser_media_player_manager_register.h "
30 #include "content/public/browser/browser_main_runner.h" 30 #include "content/public/browser/browser_main_runner.h"
31 #include "content/public/browser/browser_thread.h" 31 #include "content/public/browser/browser_thread.h"
32 #include "content/public/common/content_descriptors.h" 32 #include "content/public/common/content_descriptors.h"
33 #include "content/public/common/content_switches.h" 33 #include "content/public/common/content_switches.h"
34 #include "gin/public/isolate_holder.h" 34 #include "gin/public/isolate_holder.h"
35 #include "gpu/command_buffer/client/gl_in_process_context.h" 35 #include "gpu/command_buffer/client/gl_in_process_context.h"
36 #include "gpu/command_buffer/service/gpu_switches.h" 36 #include "gpu/command_buffer/service/gpu_switches.h"
37 #include "media/base/media_switches.h" 37 #include "media/base/media_switches.h"
38 #include "ui/events/gesture_detection/gesture_configuration.h"
38 39
39 namespace android_webview { 40 namespace android_webview {
40 41
41 namespace { 42 namespace {
42 43
43 // TODO(boliu): Remove this global Allow once the underlying issues are 44 // TODO(boliu): Remove this global Allow once the underlying issues are
44 // resolved - http://crbug.com/240453. See AwMainDelegate::RunProcess below. 45 // resolved - http://crbug.com/240453. See AwMainDelegate::RunProcess below.
45 base::LazyInstance<scoped_ptr<ScopedAllowWaitForLegacyWebViewApi> > 46 base::LazyInstance<scoped_ptr<ScopedAllowWaitForLegacyWebViewApi> >
46 g_allow_wait_in_ui_thread = LAZY_INSTANCE_INITIALIZER; 47 g_allow_wait_in_ui_thread = LAZY_INSTANCE_INITIALIZER;
47 48
48 } 49 }
49 50
50 AwMainDelegate::AwMainDelegate() { 51 AwMainDelegate::AwMainDelegate() {
51 } 52 }
52 53
53 AwMainDelegate::~AwMainDelegate() { 54 AwMainDelegate::~AwMainDelegate() {
54 } 55 }
55 56
56 bool AwMainDelegate::BasicStartupComplete(int* exit_code) { 57 bool AwMainDelegate::BasicStartupComplete(int* exit_code) {
57 content::SetContentClient(&content_client_); 58 content::SetContentClient(&content_client_);
58 59
59 content::RegisterMediaUrlInterceptor(new AwMediaUrlInterceptor()); 60 content::RegisterMediaUrlInterceptor(new AwMediaUrlInterceptor());
60 61
61 BrowserViewRenderer::CalculateTileMemoryPolicy(); 62 BrowserViewRenderer::CalculateTileMemoryPolicy();
62 63
64 ui::GestureConfiguration::GetInstance()
65 ->set_fling_touchscreen_tap_suppression_enabled(false);
jdduke (slow) 2015/07/31 23:04:28 This might be worth a comment, something about tap
hush (inactive) 2015/07/31 23:13:33 Done.
66
63 base::CommandLine* cl = base::CommandLine::ForCurrentProcess(); 67 base::CommandLine* cl = base::CommandLine::ForCurrentProcess();
64 cl->AppendSwitch(switches::kUseIpcCommandBuffer); 68 cl->AppendSwitch(switches::kUseIpcCommandBuffer);
65 cl->AppendSwitch(cc::switches::kEnableBeginFrameScheduling); 69 cl->AppendSwitch(cc::switches::kEnableBeginFrameScheduling);
66 70
67 // WebView uses the Android system's scrollbars and overscroll glow. 71 // WebView uses the Android system's scrollbars and overscroll glow.
68 cl->AppendSwitch(switches::kDisableOverscrollEdgeEffect); 72 cl->AppendSwitch(switches::kDisableOverscrollEdgeEffect);
69 73
70 // Pull-to-refresh should never be a default WebView action. 74 // Pull-to-refresh should never be a default WebView action.
71 cl->AppendSwitch(switches::kDisablePullToRefreshEffect); 75 cl->AppendSwitch(switches::kDisablePullToRefreshEffect);
72 76
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 #if defined(VIDEO_HOLE) 206 #if defined(VIDEO_HOLE)
203 content::ExternalVideoSurfaceContainer* 207 content::ExternalVideoSurfaceContainer*
204 AwMainDelegate::CreateExternalVideoSurfaceContainer( 208 AwMainDelegate::CreateExternalVideoSurfaceContainer(
205 content::WebContents* web_contents) { 209 content::WebContents* web_contents) {
206 return external_video_surface::ExternalVideoSurfaceContainerImpl::Create( 210 return external_video_surface::ExternalVideoSurfaceContainerImpl::Create(
207 web_contents); 211 web_contents);
208 } 212 }
209 #endif 213 #endif
210 214
211 } // namespace android_webview 215 } // namespace android_webview
OLDNEW
« no previous file with comments | « android_webview/lib/DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698