| Index: content/browser/web_contents/navigation_controller_impl.h
|
| ===================================================================
|
| --- content/browser/web_contents/navigation_controller_impl.h (revision 163514)
|
| +++ content/browser/web_contents/navigation_controller_impl.h (working copy)
|
| @@ -16,47 +16,46 @@
|
| #include "content/public/browser/navigation_type.h"
|
|
|
| struct ViewHostMsg_FrameNavigate_Params;
|
| -class WebContentsImpl;
|
|
|
| namespace content {
|
| class NavigationEntryImpl;
|
| +class WebContentsImpl;
|
| +class SiteInstance;
|
| struct LoadCommittedDetails;
|
| -class SiteInstance;
|
| -}
|
|
|
| class CONTENT_EXPORT NavigationControllerImpl
|
| - : public NON_EXPORTED_BASE(content::NavigationController) {
|
| + : public NON_EXPORTED_BASE(NavigationController) {
|
| public:
|
| NavigationControllerImpl(
|
| WebContentsImpl* web_contents,
|
| - content::BrowserContext* browser_context);
|
| + BrowserContext* browser_context);
|
| virtual ~NavigationControllerImpl();
|
|
|
| // NavigationController implementation:
|
| - virtual content::WebContents* GetWebContents() const OVERRIDE;
|
| - virtual content::BrowserContext* GetBrowserContext() const OVERRIDE;
|
| + virtual WebContents* GetWebContents() const OVERRIDE;
|
| + virtual BrowserContext* GetBrowserContext() const OVERRIDE;
|
| virtual void SetBrowserContext(
|
| - content::BrowserContext* browser_context) OVERRIDE;
|
| + BrowserContext* browser_context) OVERRIDE;
|
| virtual void Restore(
|
| int selected_navigation,
|
| RestoreType type,
|
| - std::vector<content::NavigationEntry*>* entries) OVERRIDE;
|
| - virtual content::NavigationEntry* GetActiveEntry() const OVERRIDE;
|
| - virtual content::NavigationEntry* GetVisibleEntry() const OVERRIDE;
|
| + std::vector<NavigationEntry*>* entries) OVERRIDE;
|
| + virtual NavigationEntry* GetActiveEntry() const OVERRIDE;
|
| + virtual NavigationEntry* GetVisibleEntry() const OVERRIDE;
|
| virtual int GetCurrentEntryIndex() const OVERRIDE;
|
| - virtual content::NavigationEntry* GetLastCommittedEntry() const OVERRIDE;
|
| + virtual NavigationEntry* GetLastCommittedEntry() const OVERRIDE;
|
| virtual int GetLastCommittedEntryIndex() const OVERRIDE;
|
| virtual bool CanViewSource() const OVERRIDE;
|
| virtual int GetEntryCount() const OVERRIDE;
|
| - virtual content::NavigationEntry* GetEntryAtIndex(int index) const OVERRIDE;
|
| - virtual content::NavigationEntry* GetEntryAtOffset(int offset) const OVERRIDE;
|
| + virtual NavigationEntry* GetEntryAtIndex(int index) const OVERRIDE;
|
| + virtual NavigationEntry* GetEntryAtOffset(int offset) const OVERRIDE;
|
| virtual void DiscardNonCommittedEntries() OVERRIDE;
|
| - virtual content::NavigationEntry* GetPendingEntry() const OVERRIDE;
|
| + virtual NavigationEntry* GetPendingEntry() const OVERRIDE;
|
| virtual int GetPendingEntryIndex() const OVERRIDE;
|
| - virtual content::NavigationEntry* GetTransientEntry() const OVERRIDE;
|
| + virtual NavigationEntry* GetTransientEntry() const OVERRIDE;
|
| virtual void LoadURL(const GURL& url,
|
| - const content::Referrer& referrer,
|
| - content::PageTransition type,
|
| + const Referrer& referrer,
|
| + PageTransition type,
|
| const std::string& extra_headers) OVERRIDE;
|
| virtual void LoadURLWithParams(const LoadURLParams& params) OVERRIDE;
|
| virtual void LoadIfNecessary() OVERRIDE;
|
| @@ -68,9 +67,9 @@
|
| virtual void GoToIndex(int index) OVERRIDE;
|
| virtual void GoToOffset(int offset) OVERRIDE;
|
| virtual void RemoveEntryAtIndex(int index) OVERRIDE;
|
| - virtual const content::SessionStorageNamespaceMap&
|
| + virtual const SessionStorageNamespaceMap&
|
| GetSessionStorageNamespaceMap() const OVERRIDE;
|
| - virtual content::SessionStorageNamespace*
|
| + virtual SessionStorageNamespace*
|
| GetDefaultSessionStorageNamespace() OVERRIDE;
|
| virtual void SetMaxRestoredPageID(int32 max_id) OVERRIDE;
|
| virtual int32 GetMaxRestoredPageID() const OVERRIDE;
|
| @@ -81,32 +80,32 @@
|
| virtual void Reload(bool check_for_repost) OVERRIDE;
|
| virtual void ReloadIgnoringCache(bool check_for_repost) OVERRIDE;
|
| virtual void ReloadOriginalRequestURL(bool check_for_repost) OVERRIDE;
|
| - virtual void NotifyEntryChanged(const content::NavigationEntry* entry,
|
| + virtual void NotifyEntryChanged(const NavigationEntry* entry,
|
| int index) OVERRIDE;
|
| virtual void CopyStateFrom(
|
| - const content::NavigationController& source) OVERRIDE;
|
| + const NavigationController& source) OVERRIDE;
|
| virtual void CopyStateFromAndPrune(
|
| - content::NavigationController* source) OVERRIDE;
|
| + NavigationController* source) OVERRIDE;
|
| virtual void PruneAllButActive() OVERRIDE;
|
|
|
| // The session storage namespace that all child RenderViews belonging to
|
| // |instance| should use.
|
| - content::SessionStorageNamespace* GetSessionStorageNamespace(
|
| - content::SiteInstance* instance);
|
| + SessionStorageNamespace* GetSessionStorageNamespace(
|
| + SiteInstance* instance);
|
|
|
| // Returns the index of the specified entry, or -1 if entry is not contained
|
| // in this NavigationController.
|
| - int GetIndexOfEntry(const content::NavigationEntryImpl* entry) const;
|
| + int GetIndexOfEntry(const NavigationEntryImpl* entry) const;
|
|
|
| // Return the index of the entry with the corresponding instance and page_id,
|
| // or -1 if not found.
|
| - int GetEntryIndexWithPageID(content::SiteInstance* instance,
|
| + int GetEntryIndexWithPageID(SiteInstance* instance,
|
| int32 page_id) const;
|
|
|
| // Return the entry with the corresponding instance and page_id, or NULL if
|
| // not found.
|
| - content::NavigationEntryImpl* GetEntryWithPageID(
|
| - content::SiteInstance* instance,
|
| + NavigationEntryImpl* GetEntryWithPageID(
|
| + SiteInstance* instance,
|
| int32 page_id) const;
|
|
|
| // Transient entry -----------------------------------------------------------
|
| @@ -118,7 +117,7 @@
|
| // represented as an entry, but should go away when the user navigates away
|
| // from them.
|
| // Note that adding a transient entry does not change the active contents.
|
| - void AddTransientEntry(content::NavigationEntryImpl* entry);
|
| + void AddTransientEntry(NavigationEntryImpl* entry);
|
|
|
| // WebContentsImpl -----------------------------------------------------------
|
|
|
| @@ -142,7 +141,7 @@
|
| // In the case that nothing has changed, the details structure is undefined
|
| // and it will return false.
|
| bool RendererDidNavigate(const ViewHostMsg_FrameNavigate_Params& params,
|
| - content::LoadCommittedDetails* details);
|
| + LoadCommittedDetails* details);
|
|
|
| // Notifies us that we just became active. This is used by the WebContentsImpl
|
| // so that we know to load URLs that were pending as "lazy" loads.
|
| @@ -181,7 +180,7 @@
|
| // associated with a |partition_id| will CHECK() fail.
|
| void SetSessionStorageNamespace(
|
| const std::string& partition_id,
|
| - content::SessionStorageNamespace* session_storage_namespace);
|
| + SessionStorageNamespace* session_storage_namespace);
|
|
|
| // Random data ---------------------------------------------------------------
|
|
|
| @@ -222,13 +221,13 @@
|
| };
|
|
|
| // Classifies the given renderer navigation (see the NavigationType enum).
|
| - content::NavigationType ClassifyNavigation(
|
| + NavigationType ClassifyNavigation(
|
| const ViewHostMsg_FrameNavigate_Params& params) const;
|
|
|
| // Causes the controller to load the specified entry. The function assumes
|
| // ownership of the pointer since it is put in the navigation list.
|
| // NOTE: Do not pass an entry that the controller already owns!
|
| - void LoadEntry(content::NavigationEntryImpl* entry);
|
| + void LoadEntry(NavigationEntryImpl* entry);
|
|
|
| // Handlers for the different types of navigation types. They will actually
|
| // handle the navigations corresponding to the different NavClasses above.
|
| @@ -263,11 +262,11 @@
|
|
|
| // Allows the derived class to issue notifications that a load has been
|
| // committed. This will fill in the active entry to the details structure.
|
| - void NotifyNavigationEntryCommitted(content::LoadCommittedDetails* details);
|
| + void NotifyNavigationEntryCommitted(LoadCommittedDetails* details);
|
|
|
| // Updates the virtual URL of an entry to match a new URL, for cases where
|
| // the real renderer URL is derived from the virtual URL, like view-source:
|
| - void UpdateVirtualURLToURL(content::NavigationEntryImpl* entry,
|
| + void UpdateVirtualURLToURL(NavigationEntryImpl* entry,
|
| const GURL& new_url);
|
|
|
| // Invoked after session/tab restore or cloning a tab. Resets the transition
|
| @@ -277,7 +276,7 @@
|
|
|
| // Inserts a new entry or replaces the current entry with a new one, removing
|
| // all entries after it. The new entry will become the active one.
|
| - void InsertOrReplaceEntry(content::NavigationEntryImpl* entry, bool replace);
|
| + void InsertOrReplaceEntry(NavigationEntryImpl* entry, bool replace);
|
|
|
| // Removes the entry at |index|, as long as it is not the current entry.
|
| void RemoveEntryAtIndexInternal(int index);
|
| @@ -312,11 +311,10 @@
|
| // ---------------------------------------------------------------------------
|
|
|
| // The user browser context associated with this controller.
|
| - content::BrowserContext* browser_context_;
|
| + BrowserContext* browser_context_;
|
|
|
| // List of NavigationEntry for this tab
|
| - typedef std::vector<linked_ptr<content::NavigationEntryImpl> >
|
| - NavigationEntries;
|
| + typedef std::vector<linked_ptr<NavigationEntryImpl> > NavigationEntries;
|
| NavigationEntries entries_;
|
|
|
| // An entry we haven't gotten a response for yet. This will be discarded
|
| @@ -326,7 +324,7 @@
|
| // This may refer to an item in the entries_ list if the pending_entry_index_
|
| // == -1, or it may be its own entry that should be deleted. Be careful with
|
| // the memory management.
|
| - content::NavigationEntryImpl* pending_entry_;
|
| + NavigationEntryImpl* pending_entry_;
|
|
|
| // currently visible entry
|
| int last_committed_entry_index_;
|
| @@ -368,7 +366,7 @@
|
| // different StoragePartitions. Even though they are part of the same
|
| // NavigationController, only entries in the same StoragePartition may
|
| // share session storage state with one another.
|
| - content::SessionStorageNamespaceMap session_storage_namespace_map_;
|
| + SessionStorageNamespaceMap session_storage_namespace_map_;
|
|
|
| // The maximum number of entries that a navigation controller can store.
|
| static size_t max_entry_count_for_testing_;
|
| @@ -390,4 +388,6 @@
|
| DISALLOW_COPY_AND_ASSIGN(NavigationControllerImpl);
|
| };
|
|
|
| +} // namespace content
|
| +
|
| #endif // CONTENT_BROWSER_WEB_CONTENTS_NAVIGATION_CONTROLLER_IMPL_H_
|
|
|