| Index: chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerTabUtils.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerTabUtils.java b/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerTabUtils.java
|
| index beacb67ecae5cebdf83f103bf779854aa2bfa4b9..fa45103c698c25c6b7e0ac46e2dafb5d6f05046e 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerTabUtils.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerTabUtils.java
|
| @@ -5,6 +5,7 @@
|
| package org.chromium.chrome.browser.dom_distiller;
|
|
|
| import org.chromium.base.annotations.JNINamespace;
|
| +import org.chromium.components.navigation_interception.InterceptNavigationDelegate;
|
| import org.chromium.content_public.browser.WebContents;
|
|
|
| /**
|
| @@ -39,6 +40,7 @@ public class DomDistillerTabUtils {
|
| WebContents sourceWebContents, WebContents destinationWebContents) {
|
| nativeDistillAndView(sourceWebContents, destinationWebContents);
|
| }
|
| +
|
| /**
|
| * Returns the formatted version of the original URL of a distillation, given the original URL.
|
| *
|
| @@ -59,9 +61,21 @@ public class DomDistillerTabUtils {
|
| return nativeIsDistillerHeuristicsEnabled();
|
| }
|
|
|
| + /**
|
| + * Set an InterceptNavigationDelegate on a WebContents.
|
| + * @param delegate The navigation delegate.
|
| + * @param webContents The WebContents to bind the delegate to.
|
| + */
|
| + public static void setInterceptNavigationDelegate(InterceptNavigationDelegate delegate,
|
| + WebContents webContents) {
|
| + nativeSetInterceptNavigationDelegate(delegate, webContents);
|
| + }
|
| +
|
| private static native void nativeDistillCurrentPageAndView(WebContents webContents);
|
| private static native void nativeDistillAndView(
|
| WebContents sourceWebContents, WebContents destinationWebContents);
|
| private static native String nativeGetFormattedUrlFromOriginalDistillerUrl(String url);
|
| private static native boolean nativeIsDistillerHeuristicsEnabled();
|
| + private static native void nativeSetInterceptNavigationDelegate(
|
| + InterceptNavigationDelegate delegate, WebContents webContents);
|
| }
|
|
|