| Index: chrome/android/java/src/org/chromium/chrome/browser/navigation/NavigationHandler.java
|
| diff --git a/content/public/android/java/src/org/chromium/content_public/browser/NavigationController.java b/chrome/android/java/src/org/chromium/chrome/browser/navigation/NavigationHandler.java
|
| similarity index 70%
|
| copy from content/public/android/java/src/org/chromium/content_public/browser/NavigationController.java
|
| copy to chrome/android/java/src/org/chromium/chrome/browser/navigation/NavigationHandler.java
|
| index 6a2a2301301bc6bf803246616e7d034761b410be..718f66dd3cbddec6661f2cc5904a47bc63481a1b 100644
|
| --- a/content/public/android/java/src/org/chromium/content_public/browser/NavigationController.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/navigation/NavigationHandler.java
|
| @@ -1,19 +1,20 @@
|
| -// Copyright 2014 The Chromium Authors. All rights reserved.
|
| +// Copyright 2016 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.content_public.browser;
|
| +package org.chromium.chrome.browser.navigation;
|
|
|
| -import org.chromium.base.VisibleForTesting;
|
| +import android.support.annotation.VisibleForTesting;
|
| +
|
| +import org.chromium.content_public.browser.LoadUrlParams;
|
| +import org.chromium.content_public.browser.NavigationEntry;
|
| +import org.chromium.content_public.browser.NavigationHistory;
|
|
|
| /**
|
| - * The NavigationController Java wrapper to allow communicating with the native
|
| - * NavigationController object.
|
| + * Responsible for managing back-forward navigation for a tab. This interface enables the Chrome
|
| + * layer to interact with different types of navigation controllers from multiple sources.
|
| */
|
| -public interface NavigationController {
|
| - /**
|
| - * @return Whether back navigation is possible from the "current entry".
|
| - */
|
| +public interface NavigationHandler {
|
| boolean canGoBack();
|
|
|
| /**
|
| @@ -104,19 +105,6 @@ public interface NavigationController {
|
| public void loadUrl(LoadUrlParams params);
|
|
|
| /**
|
| - * Clears NavigationController's page history in both backwards and
|
| - * forwards directions.
|
| - */
|
| - @VisibleForTesting
|
| - public void clearHistory();
|
| -
|
| - /**
|
| - * Get a copy of the navigation history of NavigationController.
|
| - * @return navigation history of NavigationController.
|
| - */
|
| - public NavigationHistory getNavigationHistory();
|
| -
|
| - /**
|
| * Get the navigation history of NavigationController from current navigation entry index
|
| * with direction (forward/backward)
|
| * @param isForward determines forward or backward from current index
|
| @@ -160,12 +148,6 @@ public interface NavigationController {
|
| public NavigationEntry getEntryAtIndex(int index);
|
|
|
| /**
|
| - * @return The pending {@link NavigationEntry} for this controller or {@code null} if none
|
| - * exists.
|
| - */
|
| - public NavigationEntry getPendingEntry();
|
| -
|
| - /**
|
| * @return The index of the last committed entry.
|
| */
|
| public int getLastCommittedEntryIndex();
|
| @@ -176,29 +158,4 @@ public interface NavigationController {
|
| * call discards any transient or pending entries.
|
| */
|
| public boolean removeEntryAtIndex(int index);
|
| -
|
| - /**
|
| - * @return Whether it is safe to call CopyStateFrom (i.e. the navigation state is empty).
|
| - */
|
| - public boolean canCopyStateOver();
|
| -
|
| - /**
|
| - * @return Whether it is safe to call CopyStateFromAndPrune.
|
| - */
|
| - public boolean canPruneAllButLastCommitted();
|
| -
|
| - /**
|
| - * Copies the navigation state from the given controller to this one. This one should be empty.
|
| - * @param source A source of the navigation state
|
| - */
|
| - public void copyStateFrom(NavigationController source);
|
| -
|
| - /**
|
| - * A variant of CopyStateFrom. Removes all entries from this except the last committed entry,
|
| - * and inserts all entries from |source| before and including its last committed entry.
|
| - * See navigation_controller.h for more detailed description.
|
| - * @param source A source of the navigation state
|
| - * @param replaceEntry Whether to replace the current entry in source
|
| - */
|
| - public void copyStateFromAndPrune(NavigationController source, boolean replaceEntry);
|
| }
|
|
|