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

Unified Diff: chrome/browser/component/navigation_interception/java/src/org/chromium/chrome/browser/component/navigation_interception/InterceptNavigationDelegate.java

Issue 10946008: Componentize IgnoreNavigationResourceThrottle and add chrome and webview specific implementations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: moved jni to component, added Java test code Created 8 years, 2 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/component/navigation_interception/java/src/org/chromium/chrome/browser/component/navigation_interception/InterceptNavigationDelegate.java
diff --git a/chrome/browser/component/navigation_interception/java/src/org/chromium/chrome/browser/component/navigation_interception/InterceptNavigationDelegate.java b/chrome/browser/component/navigation_interception/java/src/org/chromium/chrome/browser/component/navigation_interception/InterceptNavigationDelegate.java
new file mode 100644
index 0000000000000000000000000000000000000000..5eae733f42b287191944ac2a2cea945d76f42d7b
--- /dev/null
+++ b/chrome/browser/component/navigation_interception/java/src/org/chromium/chrome/browser/component/navigation_interception/InterceptNavigationDelegate.java
@@ -0,0 +1,21 @@
+// Copyright (c) 2012 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.component.navigation_interception;
+
+import org.chromium.base.CalledByNative;
+
+public interface InterceptNavigationDelegate {
+ /**
+ * This method is called for every top-level navigation within the associated WebContents.
+ * The method allows the embedder to ignore navigations. This is used on Android to 'convert'
+ * certain navigations to Intents to 3rd party applications.
+ *
+ * @param url the target url of the navigation.
+ * @param isContentInitiated true if the navigation was initiated by the user.
joth 2012/10/03 22:01:32 nit: isContentInitiated -> isUserGesture or is t
mkosiba (inactive) 2012/10/08 15:09:12 good find! thanks!
+ * @return true if the navigation should be ignored.
+ */
+ @CalledByNative
+ boolean shouldIgnoreNavigation(String url, boolean isContentInitiated);
+}

Powered by Google App Engine
This is Rietveld 408576698