diff options
author | mkosiba@chromium.org <mkosiba@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-30 17:46:09 +0000 |
---|---|---|
committer | mkosiba@chromium.org <mkosiba@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-30 17:46:09 +0000 |
commit | d19f69c46a4f53d5fb785805cfc3e6cb2db96018 (patch) | |
tree | 95c455a158589f6990ecc32073822eecdc12532e /components/navigation_interception | |
parent | 3b157e2a86b787b27cc200537b88c7040b05d2bf (diff) | |
download | chromium_src-d19f69c46a4f53d5fb785805cfc3e6cb2db96018.zip chromium_src-d19f69c46a4f53d5fb785805cfc3e6cb2db96018.tar.gz chromium_src-d19f69c46a4f53d5fb785805cfc3e6cb2db96018.tar.bz2 |
[android] Add param struct to navigation interception Java code.
This is a prerequisite to refactoring the navigation interception
Java code to use a class to pass around parameters.
TBR=jknotten@chromium.org
BUG=None
TESTS=components_unittests,AndroidWebViewTests
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/12095061
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@179669 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'components/navigation_interception')
-rw-r--r-- | components/navigation_interception/android/java/src/org/chromium/content/components/navigation_interception/NavigationParams.java | 36 |
1 files changed, 36 insertions, 0 deletions
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 0000000..cdfd883 --- /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); + } +} |