| Index: android_webview/native/aw_contents.cc
|
| diff --git a/android_webview/native/aw_contents.cc b/android_webview/native/aw_contents.cc
|
| index 257ea51b175b1f19e61e3654923196461a83bda8..cc6902461c047930630cedb6cd44c2837011aff4 100644
|
| --- a/android_webview/native/aw_contents.cc
|
| +++ b/android_webview/native/aw_contents.cc
|
| @@ -16,6 +16,7 @@
|
| #include "base/bind.h"
|
| #include "base/callback.h"
|
| #include "base/supports_user_data.h"
|
| +#include "chrome/browser/component/navigation_interception/intercept_navigation_delegate.h"
|
| #include "content/public/browser/android/content_view_core.h"
|
| #include "content/public/browser/browser_thread.h"
|
| #include "content/public/browser/cert_store.h"
|
| @@ -36,6 +37,7 @@ using base::android::ScopedJavaLocalRef;
|
| using content::BrowserThread;
|
| using content::ContentViewCore;
|
| using content::WebContents;
|
| +using navigation_interception::InterceptNavigationDelegate;
|
|
|
| namespace android_webview {
|
|
|
| @@ -219,6 +221,16 @@ void AwContents::SetIoThreadClient(JNIEnv* env, jobject obj, jobject client) {
|
| web_contents, ScopedJavaLocalRef<jobject>(env, client));
|
| }
|
|
|
| +void AwContents::SetInterceptNavigationDelegate(JNIEnv* env,
|
| + jobject obj,
|
| + jobject delegate) {
|
| + DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| + content::WebContents* web_contents = contents_container_->GetWebContents();
|
| + InterceptNavigationDelegate::Associate(
|
| + web_contents,
|
| + make_scoped_ptr(new InterceptNavigationDelegate(env, delegate)));
|
| +}
|
| +
|
| static jint Init(JNIEnv* env,
|
| jobject obj,
|
| jobject web_contents_delegate,
|
|
|