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

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

Issue 1058193002: Add support for not owning distilled WebContents (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix issues. Created 5 years, 7 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
« no previous file with comments | « no previous file | chrome/browser/dom_distiller/tab_utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 8b11b09eb6d301e39eea91d81ffe36b5614251c1..01660e30ffecb45a3aca7e11c164344b4d1be285 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
@@ -28,6 +28,18 @@ public class DomDistillerTabUtils {
}
/**
+ * Starts distillation in the source @{link WebContents} while navigating the destination
+ * {@link WebContents} to view the distilled content. This does not take ownership of any
+ * of the WebContents.
+ *
+ * @param sourceWebContents the WebContents to distill.
+ * @param destinationWebContents the WebContents to display the distilled content in.
+ */
+ public static void distillAndView(
+ WebContents sourceWebContents, WebContents destinationWebContents) {
+ nativeDistillAndView(sourceWebContents, destinationWebContents);
+ }
+ /**
* Returns the formatted version of the original URL of a distillation, given the original URL.
*
* @param url The original URL.
@@ -38,5 +50,7 @@ public class DomDistillerTabUtils {
}
private static native void nativeDistillCurrentPageAndView(WebContents webContents);
+ private static native void nativeDistillAndView(
+ WebContents sourceWebContents, WebContents destinationWebContents);
private static native String nativeGetFormattedUrlFromOriginalDistillerUrl(String url);
}
« no previous file with comments | « no previous file | chrome/browser/dom_distiller/tab_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698