diff options
author | sdefresne <sdefresne@chromium.org> | 2015-04-02 07:54:33 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-02 14:55:05 +0000 |
commit | d1d56f1c8b487e06318eec8a920ce0142e23b36d (patch) | |
tree | b9b9cd2110a27aba6c9881d020c06be66886be6c /ios | |
parent | ef026b654f3e8e0d6f83114bf0f148b26a5cc1be (diff) | |
download | chromium_src-d1d56f1c8b487e06318eec8a920ce0142e23b36d.zip chromium_src-d1d56f1c8b487e06318eec8a920ce0142e23b36d.tar.gz chromium_src-d1d56f1c8b487e06318eec8a920ce0142e23b36d.tar.bz2 |
Increase NavigationManager public interface
Move GetPendingItem() and GetLastCommittedItem() declarations from the private
implementation class to the public abstract interface.
Remove unnecessary web:: prefix as NavigationManager and NavigationManagerImpl
are both declared in the web namespace and have direct access to those types.
BUG=472117
Review URL: https://codereview.chromium.org/1044423004
Cr-Commit-Position: refs/heads/master@{#323485}
Diffstat (limited to 'ios')
-rw-r--r-- | ios/web/navigation/navigation_manager_impl.h | 18 | ||||
-rw-r--r-- | ios/web/public/navigation_manager.h | 8 |
2 files changed, 14 insertions, 12 deletions
diff --git a/ios/web/navigation/navigation_manager_impl.h b/ios/web/navigation/navigation_manager_impl.h index 92f65d4..e5f43c0 100644 --- a/ios/web/navigation/navigation_manager_impl.h +++ b/ios/web/navigation/navigation_manager_impl.h @@ -26,7 +26,7 @@ class NavigationManagerFacadeDelegate; // Implementation of NavigationManager. // Generally mirrors upstream's NavigationController. -class NavigationManagerImpl : public web::NavigationManager { +class NavigationManagerImpl : public NavigationManager { public: NavigationManagerImpl(NavigationManagerDelegate* delegate, BrowserState* browser_state); @@ -55,7 +55,7 @@ class NavigationManagerImpl : public web::NavigationManager { // Replace the session history with a new one, where |items| is the // complete set of navigation items in the new history, and |current_index| // is the index of the currently active item. - void ReplaceSessionHistory(ScopedVector<web::NavigationItem> items, + void ReplaceSessionHistory(ScopedVector<NavigationItem> items, int current_index); // Sets the delegate used to drive the navigation controller facade. @@ -68,19 +68,11 @@ class NavigationManagerImpl : public web::NavigationManager { void OnNavigationItemChanged(); void OnNavigationItemCommitted(); - // Returns the pending entry corresponding to the navigation that is - // currently in progress, or nullptr if there is none. - NavigationItem* GetPendingItem() const; - // Returns the transient item if any. This is an item which is removed and // discarded if any navigation occurs. Note that the returned item is owned // by the navigation manager and may be deleted at any time. NavigationItem* GetTransientItem() const; - // Returns the last committed NavigationItem, which may be NULL if there - // are no committed entries. - NavigationItem* GetLastCommittedItem() const; - // Returns the committed NavigationItem at |index|. NavigationItem* GetItemAtIndex(size_t index) const; @@ -95,7 +87,7 @@ class NavigationManagerImpl : public web::NavigationManager { void DiscardNonCommittedEntries(); int GetPendingEntryIndex() const; void LoadURL(const GURL& url, - const web::Referrer& referrer, + const Referrer& referrer, ui::PageTransition type); bool CanGoBack() const; bool CanGoForward() const; @@ -118,7 +110,9 @@ class NavigationManagerImpl : public web::NavigationManager { // NavigationManager: BrowserState* GetBrowserState() const override; WebState* GetWebState() const override; - web::NavigationItem* GetVisibleItem() const override; + NavigationItem* GetVisibleItem() const override; + NavigationItem* GetLastCommittedItem() const override; + NavigationItem* GetPendingItem() const override; // Copy state from |navigation_manager|, including a copy of that object's // CRWSessionController. diff --git a/ios/web/public/navigation_manager.h b/ios/web/public/navigation_manager.h index 841a341..4fa74a2 100644 --- a/ios/web/public/navigation_manager.h +++ b/ios/web/public/navigation_manager.h @@ -31,6 +31,14 @@ class NavigationManager { // the current entry to the user. It ignores certain pending entries, to // prevent spoofing attacks using slow-loading navigations. virtual NavigationItem* GetVisibleItem() const = 0; + + // Returns the last committed NavigationItem, which may be null if there + // are no committed entries. + virtual NavigationItem* GetLastCommittedItem() const = 0; + + // Returns the pending entry corresponding to the navigation that is + // currently in progress, or null if there is none. + virtual NavigationItem* GetPendingItem() const = 0; }; } // namespace web |