1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 package org.chromium.content_public.browser;
8 * The NavigationController Java wrapper to allow communicating with the native
9 * NavigationController object.
11 public interface NavigationController {
13 * @return Whether back navigation is possible from the "current entry".
18 * @return Whether forward navigation is possible from the "current entry".
20 boolean canGoForward();
23 * @param offset The offset into the navigation history.
24 * @return Whether we can move in history by given offset
26 boolean canGoToOffset(int offset);
29 * Navigates to the specified offset from the "current entry". Does nothing if the offset is
31 * @param offset The offset into the navigation history.
33 void goToOffset(int offset);
36 * Navigates to the specified index in the navigation entry for this page.
37 * @param index The navigation index to navigate to.
39 void goToNavigationIndex(int index);
42 * Goes to the navigation entry before the current one.
47 * Goes to the navigation entry following the current one.
52 * Loads the current navigation if there is a pending lazy load (after tab restore).
54 public void loadIfNecessary();
57 * Requests the current navigation to be loaded upon the next call to loadIfNecessary().
59 public void requestRestoreLoad();
62 * Reload the current page.
64 public void reload(boolean checkForRepost);
67 * Reload the current page, ignoring the contents of the cache.
69 public void reloadIgnoringCache(boolean checkForRepost);
72 * Cancel the pending reload.
74 public void cancelPendingReload();
77 * Continue the pending reload.
79 public void continuePendingReload();