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..64af61c84b7642b5437846f554dcc41148c07f30 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. |
|
Eugene But (OOO till 7-30)
2017/02/16 02:20:48
Please document the difference between UserInitiat
liaoyuke
2017/02/16 22:04:29
Done.
|
| + 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,7 @@ class NavigationManagerImpl : public NavigationManager { |
| void GoForward() override; |
| void GoToIndex(int index) override; |
| void Reload(bool check_for_reposts) override; |
| + void OverrideDesktopUserAgentForNextPendingItem() override; |
| // Returns the current list of transient url rewriters, passing ownership to |
| // the caller. |
| @@ -150,6 +162,21 @@ 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, |
| + const web::Referrer& referrer, |
| + ui::PageTransition type, |
| + bool renderer_initiated); |
| + |
| + // If true, override navigation item's useDesktopUserAgent flag and always |
| + // create the pending entry using the desktop user agent. |
| + // TODO(crbug.com/692303): Remove this when overriding the user agent doesn't |
| + // create a new NavigationItem. |
| + bool override_desktop_user_agent_for_next_pending_item_; |
| + |
| // The primary delegate for this manager. |
| NavigationManagerDelegate* delegate_; |