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

Unified Diff: android_webview/lib/main/aw_main_delegate.cc

Issue 2272703008: Do not initialize gestureconfiguration in renderer process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/lib/main/aw_main_delegate.cc
diff --git a/android_webview/lib/main/aw_main_delegate.cc b/android_webview/lib/main/aw_main_delegate.cc
index 053a91e6ce1c5f6be96225a40eb11ba9e72b7495..e15205ef24a4e5adbd193d41ea81af533186fb9c 100644
--- a/android_webview/lib/main/aw_main_delegate.cc
+++ b/android_webview/lib/main/aw_main_delegate.cc
@@ -66,13 +66,18 @@ bool AwMainDelegate::BasicStartupComplete(int* exit_code) {
content::RegisterMediaUrlInterceptor(new AwMediaUrlInterceptor());
BrowserViewRenderer::CalculateTileMemoryPolicy();
-
- // WebView apps can override WebView#computeScroll to achieve custom
- // scroll/fling. As a result, fling animations may not be ticked, potentially
- // confusing the tap suppression controller. Simply disable it for WebView.
- ui::GestureConfiguration::GetInstance()
- ->set_fling_touchscreen_tap_suppression_enabled(false);
-
+ const base::CommandLine& command_line =
+ *base::CommandLine::ForCurrentProcess();
boliu 2016/08/25 02:45:52 don't create another instance, re-use cl* pointer
sgurun-gerrit only 2016/08/25 15:04:48 Done.
+ std::string process_type =
+ command_line.GetSwitchValueASCII(switches::kProcessType);
+ if (process_type != switches::kRendererProcess) {
boliu 2016/08/25 02:45:52 you can also exclude RegisterMediaUrlInterceptor a
sgurun-gerrit only 2016/08/25 15:04:48 Done.
+ // WebView apps can override WebView#computeScroll to achieve custom
+ // scroll/fling. As a result, fling animations may not be ticked,
+ // potentially
+ // confusing the tap suppression controller. Simply disable it for WebView
+ ui::GestureConfiguration::GetInstance()
+ ->set_fling_touchscreen_tap_suppression_enabled(false);
+ }
base::CommandLine* cl = base::CommandLine::ForCurrentProcess();
cl->AppendSwitch(cc::switches::kEnableBeginFrameScheduling);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698