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..0ec5970c7f5dbede8de047b42686f726a7739063 100644 |
--- a/android_webview/lib/main/aw_main_delegate.cc |
+++ b/android_webview/lib/main/aw_main_delegate.cc |
@@ -63,16 +63,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(); |
cl->AppendSwitch(cc::switches::kEnableBeginFrameScheduling); |
@@ -120,6 +110,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()); |