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

Unified Diff: chrome/browser/dom_distiller/tab_utils_android.cc

Issue 266073003: Add support for distilling current WebContents (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added comment Created 6 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
Index: chrome/browser/dom_distiller/tab_utils_android.cc
diff --git a/chrome/browser/dom_distiller/tab_utils_android.cc b/chrome/browser/dom_distiller/tab_utils_android.cc
new file mode 100644
index 0000000000000000000000000000000000000000..f0557e16260301669dc4e86e1bf97890ade2f166
--- /dev/null
+++ b/chrome/browser/dom_distiller/tab_utils_android.cc
@@ -0,0 +1,35 @@
+// 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.
+
+#include "chrome/browser/dom_distiller/tab_utils_android.h"
+
+#include <string>
+
+#include "chrome/browser/dom_distiller/tab_utils.h"
+#include "content/public/browser/web_contents.h"
+#include "jni/DomDistillerTabUtils_jni.h"
+
+namespace dom_distiller {
+
+namespace tab_utils {
+
+namespace android {
+
+void DistillCurrentPageAndViewJava(JNIEnv* env,
Yaron 2014/05/16 02:02:49 nit: remove "Java" from the name
nyquist 2014/05/20 19:58:37 Done.
+ jclass clazz,
+ jobject j_web_contents) {
+ content::WebContents* web_contents =
+ content::WebContents::FromJavaWebContents(j_web_contents);
+ DistillCurrentPageAndView(web_contents);
+}
+
+bool RegisterTabUtils(JNIEnv* env) {
+ return RegisterNativesImpl(env);
+}
+
+} // namespace android
+
+} // namespace tab_utils
+
+} // namespace dom_distiller

Powered by Google App Engine
This is Rietveld 408576698