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

Unified Diff: components/dom_distiller/android/java/src/org/chromium/components/dom_distiller/core/DomDistillerUrlUtils.java

Issue 185113002: Add UI hook for distilling web pages for test shell. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased after testshell->shell change Created 6 years, 10 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: components/dom_distiller/android/java/src/org/chromium/components/dom_distiller/core/DomDistillerUrlUtils.java
diff --git a/components/dom_distiller/android/java/src/org/chromium/components/dom_distiller/core/DomDistillerUrlUtils.java b/components/dom_distiller/android/java/src/org/chromium/components/dom_distiller/core/DomDistillerUrlUtils.java
new file mode 100644
index 0000000000000000000000000000000000000000..598e299de89a19d860c27f6c72cdb2f0b5c9aa39
--- /dev/null
+++ b/components/dom_distiller/android/java/src/org/chromium/components/dom_distiller/core/DomDistillerUrlUtils.java
@@ -0,0 +1,30 @@
+// 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.components.dom_distiller.core;
+
+import org.chromium.base.JNINamespace;
+
+/**
+ * Wrapper for the dom_distiller::url_utils.
+ */
+@JNINamespace("dom_distiller::url_utils::android")
+public final class DomDistillerUrlUtils {
+
+ private DomDistillerUrlUtils() {
+ }
+
+ /**
+ * Returns the URL for viewing distilled content for a URL.
+ *
+ * @param scheme The scheme for the DOM Distiller source.
+ * @param url The URL to distill.
+ * @return the URL to load to get the distilled version of a page.
+ */
+ public static String getDistillerViewUrlFromUrl(String scheme, String url) {
+ return nativeGetDistillerViewUrlFromUrl(scheme, url);
+ }
+
+ private static native String nativeGetDistillerViewUrlFromUrl(String scheme, String url);
+}
« no previous file with comments | « components/dom_distiller/android/component_jni_registrar.cc ('k') | components/dom_distiller/core/url_utils_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698