summaryrefslogtreecommitdiffstats
path: root/android_webview/browser/aw_content_browser_client.cc
diff options
context:
space:
mode:
Diffstat (limited to 'android_webview/browser/aw_content_browser_client.cc')
-rw-r--r--android_webview/browser/aw_content_browser_client.cc19
1 files changed, 19 insertions, 0 deletions
diff --git a/android_webview/browser/aw_content_browser_client.cc b/android_webview/browser/aw_content_browser_client.cc
index 759c844..ab14d49 100644
--- a/android_webview/browser/aw_content_browser_client.cc
+++ b/android_webview/browser/aw_content_browser_client.cc
@@ -25,10 +25,13 @@
#include "base/command_line.h"
#include "base/path_service.h"
#include "components/cdm/browser/cdm_message_filter_android.h"
+#include "components/navigation_interception/intercept_navigation_delegate.h"
#include "content/public/browser/access_token_store.h"
#include "content/public/browser/browser_message_filter.h"
#include "content/public/browser/child_process_security_policy.h"
#include "content/public/browser/client_certificate_delegate.h"
+#include "content/public/browser/navigation_handle.h"
+#include "content/public/browser/navigation_throttle.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
@@ -487,6 +490,22 @@ void AwContentBrowserClient::OverrideWebkitPrefs(
content::WebContents::FromRenderViewHost(rvh), web_prefs);
}
+ScopedVector<content::NavigationThrottle>
+AwContentBrowserClient::CreateThrottlesForNavigation(
+ content::NavigationHandle* navigation_handle) {
+ ScopedVector<content::NavigationThrottle> throttles;
+ if (navigation_handle->IsInMainFrame() ||
+ (!navigation_handle->GetURL().SchemeIs(url::kHttpScheme) &&
+ !navigation_handle->GetURL().SchemeIs(url::kHttpsScheme) &&
+ !navigation_handle->GetURL().SchemeIs(url::kAboutScheme))) {
+ throttles.push_back(
+ navigation_interception::InterceptNavigationDelegate::CreateThrottleFor(
+ navigation_handle)
+ .Pass());
+ }
+ return throttles.Pass();
+}
+
#if defined(VIDEO_HOLE)
content::ExternalVideoSurfaceContainer*
AwContentBrowserClient::OverrideCreateExternalVideoSurfaceContainer(