Commit 2fc863f2 authored by sgurun's avatar sgurun Committed by Commit bot

Do not initialize gestureconfiguration in renderer process

When multiprocess is enabled for webview, do not initialize
gesture configuration in renderer process as this eventually
leads to accessing Window Manager Service.

BUG=640379

Bug: b/31045266
Review-Url: https://codereview.chromium.org/2272703008
Cr-Commit-Position: refs/heads/master@{#414445}
parent c6bc15db
......@@ -64,16 +64,6 @@ AwMainDelegate::~AwMainDelegate() {
bool AwMainDelegate::BasicStartupComplete(int* exit_code) {
content::SetContentClient(&content_client_);
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);
base::CommandLine* cl = base::CommandLine::ForCurrentProcess();
// WebView uses the Android system's scrollbars and overscroll glow.
......@@ -121,6 +111,15 @@ bool AwMainDelegate::BasicStartupComplete(int* exit_code) {
if (cl->GetSwitchValueASCII(switches::kProcessType).empty()) {
// Browser process (no type specified).
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);
base::android::RegisterApkAssetWithGlobalDescriptors(
kV8NativesDataDescriptor,
gin::V8Initializer::GetNativesFilePath().AsUTF8Unsafe());
......
......@@ -23,7 +23,10 @@ class AwContentBrowserClient;
class AwContentGpuClient;
class AwContentRendererClient;
// Android WebView implementation of ContentMainDelegate.
// Android WebView implementation of ContentMainDelegate. The methods in
// this class runs per process, (browser and renderer) so when making changes
// make sure to properly conditionalize for browser vs. renderer wherever
// needed.
class AwMainDelegate : public content::ContentMainDelegate,
public JniDependencyFactory {
public:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment