Chromium Code Reviews| Index: ios/web/navigation/navigation_manager_impl.h |
| diff --git a/ios/web/navigation/navigation_manager_impl.h b/ios/web/navigation/navigation_manager_impl.h |
| index cf1b29562b7eca3487604784d65e6a613354ca0e..b26e1305a8ecfd1f63d1541302777c466529a05e 100644 |
| --- a/ios/web/navigation/navigation_manager_impl.h |
| +++ b/ios/web/navigation/navigation_manager_impl.h |
| @@ -82,6 +82,17 @@ class NavigationManagerImpl : public NavigationManager { |
| const Referrer& referrer, |
| ui::PageTransition type); |
| + // Add a new item with the given url, referrer, and navigation type, making it |
| + // the current item. If pending item is the same as the current item, this |
| + // does nothing. |referrer| may be nil if there isn't one. The item starts |
| + // out as pending, and will be lost unless |-commitPendingItem| is called. |
| + void AddUserInitiatedPendingItem(const GURL& url, |
| + const web::Referrer& referrer, |
| + ui::PageTransition type); |
| + void AddRendererInitiatedPendingItem(const GURL& url, |
| + const web::Referrer& referrer, |
| + ui::PageTransition type); |
| + |
| // Convenience accessors to get the underlying NavigationItems from the |
| // SessionEntries returned from |session_controller_|'s -lastUserEntry and |
| // -previousEntry methods. |
| @@ -119,6 +130,8 @@ class NavigationManagerImpl : public NavigationManager { |
| void GoForward() override; |
| void GoToIndex(int index) override; |
| void Reload(bool check_for_reposts) override; |
| + // Removes this method once crbug.com/692303 is fixed. |
|
kkhorimoto
2017/02/15 23:02:06
This comment isn't really necessary since it's alr
liaoyuke
2017/02/16 01:49:05
Done.
|
| + void OverrideDesktopUserAgentForNextPendingItem() override; |
| // Returns the current list of transient url rewriters, passing ownership to |
| // the caller. |
| @@ -150,6 +163,20 @@ class NavigationManagerImpl : public NavigationManager { |
| // |index| has ui::PAGE_TRANSITION_IS_REDIRECT_MASK. |
| bool IsRedirectItemAtIndex(int index) const; |
| + // Add a new item with the given url, referrer, and navigation type, making it |
| + // the current item. If pending item is the same as the current item, this |
| + // does nothing. |referrer| may be nil if there isn't one. The item starts |
| + // out as pending, and will be lost unless |-commitPendingItem| is called. |
| + void AddPendingItem(const GURL& url, |
|
kkhorimoto
2017/02/15 23:02:06
Why not just expose this in the public interface i
liaoyuke
2017/02/16 01:49:05
I feel like having a boolean value as a function p
|
| + const web::Referrer& referrer, |
| + ui::PageTransition type, |
| + bool rendererInitiated); |
|
kkhorimoto
2017/02/15 23:02:06
s/rendererInitiated/renderer_initiated
liaoyuke
2017/02/16 01:49:05
Done.
|
| + |
| + // If true, override navigation item's useDesktopUserAgent flag and always |
| + // create the pending entry using the desktop user agent. |
| + // Removes this method once crbug.com/692303 is fixed. |
| + bool override_desktop_user_agent_for_next_pending_item_; |
| + |
| // The primary delegate for this manager. |
| NavigationManagerDelegate* delegate_; |