Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerTabUtils.java

Issue 1837243002: Reader Mode support for low-end devices (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: swipe triggers custom tab Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
}

Powered by Google App Engine
This is Rietveld 408576698