| Index: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
| diff --git a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
| index 7a4c05e963061f7c0e5e18756dbdf72d558d39f8..6d31fe74c17b0af24ee026f4e4115ed6e98798fd 100644
|
| --- a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
| +++ b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
| @@ -890,6 +890,14 @@ public class ContentViewCore implements MotionEventDelegate {
|
| }
|
|
|
| /**
|
| + * Navigates to the specified index in the navigation entry for this page.
|
| + * @param index The navigation index to navigate to.
|
| + */
|
| + public void goToNavigationIndex(int index) {
|
| + if (mNativeContentViewCore != 0) nativeGoToNavigationIndex(mNativeContentViewCore, index);
|
| + }
|
| +
|
| + /**
|
| * Goes to the navigation entry before the current one.
|
| */
|
| public void goBack() {
|
| @@ -2354,9 +2362,10 @@ public class ContentViewCore implements MotionEventDelegate {
|
| * Callback factory method for nativeGetNavigationHistory().
|
| */
|
| @CalledByNative
|
| - private void addToNavigationHistory(Object history, String url, String virtualUrl,
|
| + private void addToNavigationHistory(Object history, int index, String url, String virtualUrl,
|
| String originalUrl, String title, Bitmap favicon) {
|
| - NavigationEntry entry = new NavigationEntry(url, virtualUrl, originalUrl, title, favicon);
|
| + NavigationEntry entry = new NavigationEntry(
|
| + index, url, virtualUrl, originalUrl, title, favicon);
|
| ((NavigationHistory) history).addEntry(entry);
|
| }
|
|
|
| @@ -2371,6 +2380,18 @@ public class ContentViewCore implements MotionEventDelegate {
|
| }
|
|
|
| /**
|
| + * Get a directed copy of the navigation history of the view.
|
| + * @param isForward Whether the returned history should be entries after the current entry.
|
| + * @param itemLimit The limit on the number of items included in the history.
|
| + * @return A directed navigation for the page.
|
| + */
|
| + public NavigationHistory getDirectedNavigationHistory(boolean isForward, int itemLimit) {
|
| + NavigationHistory history = new NavigationHistory();
|
| + nativeGetDirectedNavigationHistory(mNativeContentViewCore, history, isForward, itemLimit);
|
| + return history;
|
| + }
|
| +
|
| + /**
|
| * Update of the latest vsync parameters.
|
| * @param tickTimeMicros The latest vsync tick time in microseconds.
|
| * @param intervalMicros The vsync interval in microseconds.
|
| @@ -2467,16 +2488,12 @@ public class ContentViewCore implements MotionEventDelegate {
|
| int nativeContentViewCoreImpl, int x1, int y1, int x2, int y2);
|
|
|
| private native boolean nativeCanGoBack(int nativeContentViewCoreImpl);
|
| -
|
| private native boolean nativeCanGoForward(int nativeContentViewCoreImpl);
|
| -
|
| private native boolean nativeCanGoToOffset(int nativeContentViewCoreImpl, int offset);
|
| -
|
| - private native void nativeGoToOffset(int nativeContentViewCoreImpl, int offset);
|
| -
|
| private native void nativeGoBack(int nativeContentViewCoreImpl);
|
| -
|
| private native void nativeGoForward(int nativeContentViewCoreImpl);
|
| + private native void nativeGoToOffset(int nativeContentViewCoreImpl, int offset);
|
| + private native void nativeGoToNavigationIndex(int nativeContentViewCoreImpl, int index);
|
|
|
| private native void nativeStopLoading(int nativeContentViewCoreImpl);
|
|
|
| @@ -2519,6 +2536,8 @@ public class ContentViewCore implements MotionEventDelegate {
|
| private native void nativeRemoveJavascriptInterface(int nativeContentViewCoreImpl, String name);
|
|
|
| private native int nativeGetNavigationHistory(int nativeContentViewCoreImpl, Object context);
|
| + private native void nativeGetDirectedNavigationHistory(int nativeContentViewCoreImpl,
|
| + Object context, boolean isForward, int maxEntries);
|
|
|
| private native void nativeUpdateVSyncParameters(int nativeContentViewCoreImpl,
|
| long timebaseMicros, long intervalMicros);
|
|
|