| Index: content/public/browser/navigation_controller.h
|
| diff --git a/content/public/browser/navigation_controller.h b/content/public/browser/navigation_controller.h
|
| index 4829349e8930ebc4eb0eb4a4fe488833dcb57011..c9c1a01384a76cd56736af5fe1bc2e9e5c4ec4fd 100644
|
| --- a/content/public/browser/navigation_controller.h
|
| +++ b/content/public/browser/navigation_controller.h
|
| @@ -24,11 +24,11 @@ class SessionStorageNamespace;
|
| class WebContents;
|
| struct Referrer;
|
|
|
| -// A NavigationController maintains the back-forward list for a single tab and
|
| +// A NavigationController maintains the back-forward list for a WebContents and
|
| // manages all navigation within that list.
|
| //
|
| -// The NavigationController also owns all WebContents for the tab. This is to
|
| -// make sure that we have at most one WebContents instance per type.
|
| +// Each NavigationController belongs to one WebContents; each WebContents has
|
| +// exactly one NavigationController.
|
| class NavigationController {
|
| public:
|
| enum ReloadType {
|
| @@ -37,9 +37,9 @@ class NavigationController {
|
| RELOAD_IGNORING_CACHE // Reload bypassing the cache, aka shift-reload.
|
| };
|
|
|
| - // Creates navigation entry and translates the virtual url to a real one.
|
| - // Used when navigating to a new URL using LoadURL. Extra headers are
|
| - // separated by \n.
|
| + // Creates a navigation entry and translates the virtual url to a real one.
|
| + // This is a general call; prefer LoadURL[FromRenderer]/TransferURL below.
|
| + // Extra headers are separated by \n.
|
| CONTENT_EXPORT static NavigationEntry* CreateNavigationEntry(
|
| const GURL& url,
|
| const Referrer& referrer,
|
| @@ -54,8 +54,8 @@ class NavigationController {
|
|
|
| virtual ~NavigationController() {}
|
|
|
| - // Returns the web contents associated with this controller. Non-NULL except
|
| - // during set-up of the tab.
|
| + // Returns the web contents associated with this controller. It can never be
|
| + // NULL.
|
| virtual WebContents* GetWebContents() const = 0;
|
|
|
| // Get/set the browser context for this controller. It can never be NULL.
|
| @@ -73,6 +73,17 @@ class NavigationController {
|
| bool from_last_session,
|
| std::vector<NavigationEntry*>* entries) = 0;
|
|
|
| + // Entries -------------------------------------------------------------------
|
| +
|
| + // There are two basic states for entries: pending and committed. When an
|
| + // entry is navigated to, a request is sent to the server. While that request
|
| + // has not been responded to, the NavigationEntry is pending. Once data is
|
| + // received for that entry, that NavigationEntry is committed.
|
| +
|
| + // A transient entry is an entry that, when the user navigates away, is
|
| + // removed and discarded rather than being added to the back-forward list.
|
| + // Transient entries are useful for interstitial pages and the like.
|
| +
|
| // Active entry --------------------------------------------------------------
|
|
|
| // Returns the active entry, which is the transient entry if any, the pending
|
|
|