From 4e4059260027f10633df040d26ab9116a63322e8 Mon Sep 17 00:00:00 2001 From: "yfriedman@chromium.org" Date: Tue, 5 Feb 2013 22:41:57 +0000 Subject: Move navigation_interception Java code to match package. In java, the file path should match the package path. NOTRY=true Review URL: https://chromiumcodereview.appspot.com/12207006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180803 0039d316-1c4b-4281-b951-d872f2087c98 --- .../InterceptNavigationDelegate.java | 21 +++++++++++++ .../navigation_interception/NavigationParams.java | 36 ++++++++++++++++++++++ .../InterceptNavigationDelegate.java | 21 ------------- .../navigation_interception/NavigationParams.java | 36 ---------------------- 4 files changed, 57 insertions(+), 57 deletions(-) create mode 100644 components/navigation_interception/android/java/src/org/chromium/components/navigation_interception/InterceptNavigationDelegate.java create mode 100644 components/navigation_interception/android/java/src/org/chromium/components/navigation_interception/NavigationParams.java delete mode 100644 components/navigation_interception/android/java/src/org/chromium/content/components/navigation_interception/InterceptNavigationDelegate.java delete mode 100644 components/navigation_interception/android/java/src/org/chromium/content/components/navigation_interception/NavigationParams.java (limited to 'components/navigation_interception/android') diff --git a/components/navigation_interception/android/java/src/org/chromium/components/navigation_interception/InterceptNavigationDelegate.java b/components/navigation_interception/android/java/src/org/chromium/components/navigation_interception/InterceptNavigationDelegate.java new file mode 100644 index 0000000..f214467 --- /dev/null +++ b/components/navigation_interception/android/java/src/org/chromium/components/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.components.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 navigationParams parameters describing the navigation. + * @return true if the navigation should be ignored. + */ + @CalledByNative + boolean shouldIgnoreNavigation(NavigationParams navigationParams); +} diff --git a/components/navigation_interception/android/java/src/org/chromium/components/navigation_interception/NavigationParams.java b/components/navigation_interception/android/java/src/org/chromium/components/navigation_interception/NavigationParams.java new file mode 100644 index 0000000..cdfd883 --- /dev/null +++ b/components/navigation_interception/android/java/src/org/chromium/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); + } +} diff --git a/components/navigation_interception/android/java/src/org/chromium/content/components/navigation_interception/InterceptNavigationDelegate.java b/components/navigation_interception/android/java/src/org/chromium/content/components/navigation_interception/InterceptNavigationDelegate.java deleted file mode 100644 index f214467..0000000 --- a/components/navigation_interception/android/java/src/org/chromium/content/components/navigation_interception/InterceptNavigationDelegate.java +++ /dev/null @@ -1,21 +0,0 @@ -// 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.components.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 navigationParams parameters describing the navigation. - * @return true if the navigation should be ignored. - */ - @CalledByNative - boolean shouldIgnoreNavigation(NavigationParams navigationParams); -} 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 deleted file mode 100644 index cdfd883..0000000 --- a/components/navigation_interception/android/java/src/org/chromium/content/components/navigation_interception/NavigationParams.java +++ /dev/null @@ -1,36 +0,0 @@ -// 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); - } -} -- cgit v1.1