| Index: chrome/browser/dom_distiller/tab_utils_android.cc
|
| diff --git a/chrome/browser/dom_distiller/tab_utils_android.cc b/chrome/browser/dom_distiller/tab_utils_android.cc
|
| index 8133eb00eec7ec8e39e230a798a855ffcc979d5b..7c04dac0657e53250ab3c3df03b73275cb0b088e 100644
|
| --- a/chrome/browser/dom_distiller/tab_utils_android.cc
|
| +++ b/chrome/browser/dom_distiller/tab_utils_android.cc
|
| @@ -12,6 +12,7 @@
|
| #include "chrome/browser/profiles/profile_manager.h"
|
| #include "chrome/common/pref_names.h"
|
| #include "components/dom_distiller/core/experiments.h"
|
| +#include "components/navigation_interception/intercept_navigation_delegate.h"
|
| #include "components/prefs/pref_service.h"
|
| #include "components/url_formatter/url_formatter.h"
|
| #include "content/public/browser/web_contents.h"
|
| @@ -72,6 +73,20 @@ jboolean IsDistillerHeuristicsEnabled(JNIEnv* env,
|
| != dom_distiller::DistillerHeuristicsType::NONE;
|
| }
|
|
|
| +void SetInterceptNavigationDelegate(
|
| + JNIEnv* env,
|
| + const JavaParamRef<jclass>& clazz,
|
| + const JavaParamRef<jobject>& delegate,
|
| + const JavaParamRef<jobject>& j_web_contents) {
|
| + content::WebContents* web_contents =
|
| + content::WebContents::FromJavaWebContents(j_web_contents);
|
| + DCHECK(web_contents);
|
| + navigation_interception::InterceptNavigationDelegate::Associate(
|
| + web_contents,
|
| + make_scoped_ptr(new navigation_interception::InterceptNavigationDelegate(
|
| + env, delegate)));
|
| +}
|
| +
|
| } // namespace android
|
|
|
| bool RegisterDomDistillerTabUtils(JNIEnv* env) {
|
|
|