Index: android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc |
diff --git a/android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc b/android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc |
index 02160ce9f13534c9343f7e79c147ebea1f3a7f43..da8a60455d103711968efbb0f22ad91c9bd3e2bc 100644 |
--- a/android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc |
+++ b/android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc |
@@ -226,15 +226,16 @@ void AwResourceDispatcherHostDelegate::RequestBeginning( |
throttles->push_back(new IoThreadClientThrottle( |
request_info->GetChildID(), request_info->GetRenderFrameID(), request)); |
- // We allow intercepting only navigations within main frames. This |
- // is used to post onPageStarted. We handle shouldOverrideUrlLoading |
- // via a sync IPC. |
- if (resource_type == content::RESOURCE_TYPE_MAIN_FRAME) { |
+ if (resource_type == content::RESOURCE_TYPE_MAIN_FRAME || |
+ (resource_type == content::RESOURCE_TYPE_SUB_FRAME && |
+ !request->url().SchemeIs(url::kHttpScheme) && |
+ !request->url().SchemeIs(url::kHttpsScheme) && |
+ !request->url().SchemeIs(url::kAboutScheme))) { |
throttles->push_back(InterceptNavigationDelegate::CreateThrottleFor( |
request)); |
- } else { |
- InterceptNavigationDelegate::UpdateUserGestureCarryoverInfo(request); |
} |
+ if (resource_type != content::RESOURCE_TYPE_MAIN_FRAME) |
+ InterceptNavigationDelegate::UpdateUserGestureCarryoverInfo(request); |
} |
void AwResourceDispatcherHostDelegate::OnRequestRedirected( |