1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 package org.chromium.chrome.browser.dom_distiller;
7 import org.chromium.base.JNINamespace;
8 import org.chromium.content_public.browser.WebContents;
11 * A helper class for using the DOM Distiller.
13 @JNINamespace("android")
14 public class DomDistillerTabUtils {
16 private DomDistillerTabUtils() {
20 * Creates a new WebContents and navigates the {@link WebContents} to view the URL of the
21 * current page, while in the background starts distilling the current page. This method takes
22 * ownership over the old WebContents after swapping in the new one.
24 * @param webContents the WebContents to distill.
26 public static void distillCurrentPageAndView(WebContents webContents) {
27 nativeDistillCurrentPageAndView(webContents);
30 private static native void nativeDistillCurrentPageAndView(WebContents webContents);