| 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
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..ed768127dff74ab673870f4b54688167f0edf23b
|
| --- /dev/null
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerTabUtils.java
|
| @@ -0,0 +1,31 @@
|
| +// Copyright 2014 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +package org.chromium.chrome.browser.dom_distiller;
|
| +
|
| +import org.chromium.base.JNINamespace;
|
| +import org.chromium.content_public.browser.WebContents;
|
| +
|
| +/**
|
| + * A helper class for using the DOM Distiller.
|
| + */
|
| +@JNINamespace("android")
|
| +public class DomDistillerTabUtils {
|
| +
|
| + private DomDistillerTabUtils() {
|
| + }
|
| +
|
| + /**
|
| + * Creates a new WebContents and navigates the {@link WebContents} to view the URL of the
|
| + * current page, while in the background starts distilling the current page. This method takes
|
| + * ownership over the old WebContents after swapping in the new one.
|
| + *
|
| + * @param webContents the WebContents to distill.
|
| + */
|
| + public static void distillCurrentPageAndView(WebContents webContents) {
|
| + nativeDistillCurrentPageAndView(webContents);
|
| + }
|
| +
|
| + private static native void nativeDistillCurrentPageAndView(WebContents webContents);
|
| +}
|
|
|