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

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

Issue 1837243002: Reader Mode support for low-end devices (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: swipe triggers custom tab Created 4 years, 9 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 | « chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/ReaderModeManagerDelegate.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
index 8133eb00eec7ec8e39e230a798a855ffcc979d5b..7c04dac0657e53250ab3c3df03b73275cb0b088e 100644
--- a/chrome/browser/dom_distiller/tab_utils_android.cc
+++ b/chrome/browser/dom_distiller/tab_utils_android.cc
@@ -12,6 +12,7 @@
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/common/pref_names.h"
#include "components/dom_distiller/core/experiments.h"
+#include "components/navigation_interception/intercept_navigation_delegate.h"
#include "components/prefs/pref_service.h"
#include "components/url_formatter/url_formatter.h"
#include "content/public/browser/web_contents.h"
@@ -72,6 +73,20 @@ jboolean IsDistillerHeuristicsEnabled(JNIEnv* env,
!= dom_distiller::DistillerHeuristicsType::NONE;
}
+void SetInterceptNavigationDelegate(
+ JNIEnv* env,
+ const JavaParamRef<jclass>& clazz,
+ const JavaParamRef<jobject>& delegate,
+ const JavaParamRef<jobject>& j_web_contents) {
+ content::WebContents* web_contents =
+ content::WebContents::FromJavaWebContents(j_web_contents);
+ DCHECK(web_contents);
+ navigation_interception::InterceptNavigationDelegate::Associate(
+ web_contents,
+ make_scoped_ptr(new navigation_interception::InterceptNavigationDelegate(
+ env, delegate)));
+}
+
} // namespace android
bool RegisterDomDistillerTabUtils(JNIEnv* env) {
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/ReaderModeManagerDelegate.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698