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

Unified Diff: components/navigation_interception/android/java/src/org/chromium/content/components/navigation_interception/NavigationParams.java

Issue 12095061: [android] Add param struct to navigation interception Java code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/navigation_interception/android/java/src/org/chromium/content/components/navigation_interception/NavigationParams.java
diff --git a/components/navigation_interception/android/java/src/org/chromium/content/components/navigation_interception/NavigationParams.java b/components/navigation_interception/android/java/src/org/chromium/content/components/navigation_interception/NavigationParams.java
new file mode 100644
index 0000000000000000000000000000000000000000..cdfd88313f7d541fc66784a428e016aa5883736e
--- /dev/null
+++ b/components/navigation_interception/android/java/src/org/chromium/content/components/navigation_interception/NavigationParams.java
@@ -0,0 +1,36 @@
+// Copyright (c) 2013 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.navigation_interception;
+
+import org.chromium.base.CalledByNative;
+
+public class NavigationParams {
+ // Target url of the navigation.
+ public final String url;
+ // True if the the navigation method is "POST".
+ public final boolean isPost;
+ // True if the navigation was initiated by the user.
+ public final boolean hasUserGesture;
+ // Page transition type (e.g. link / typed).
+ public final int pageTransitionType;
+ // Is the navigation a redirect (in which case url is the "target" address).
+ public final boolean isRedirect;
+
+ public NavigationParams(String url, boolean isPost, boolean hasUserGesture,
+ int pageTransitionType, boolean isRedirect) {
+ this.url = url;
+ this.isPost = isPost;
+ this.hasUserGesture = hasUserGesture;
+ this.pageTransitionType = pageTransitionType;
+ this.isRedirect = isRedirect;
+ }
+
+ @CalledByNative
+ public static NavigationParams create(String url, boolean isPost, boolean hasUserGesture,
+ int pageTransitionType, boolean isRedirect) {
+ return new NavigationParams(url, isPost, hasUserGesture, pageTransitionType,
+ isRedirect);
+ }
+}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698