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); |