| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef IOS_WEB_NAVIGATION_NAVIGATION_MANAGER_IMPL_H_ | 5 #ifndef IOS_WEB_NAVIGATION_NAVIGATION_MANAGER_IMPL_H_ |
| 6 #define IOS_WEB_NAVIGATION_NAVIGATION_MANAGER_IMPL_H_ | 6 #define IOS_WEB_NAVIGATION_NAVIGATION_MANAGER_IMPL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 // Adds a new item with the given url, referrer, navigation type, and | 99 // Adds a new item with the given url, referrer, navigation type, and |
| 100 // initiation type, making it the pending item. If pending item is the same as | 100 // initiation type, making it the pending item. If pending item is the same as |
| 101 // the current item, this does nothing. |referrer| may be nil if there isn't | 101 // the current item, this does nothing. |referrer| may be nil if there isn't |
| 102 // one. The item starts out as pending, and will be lost unless | 102 // one. The item starts out as pending, and will be lost unless |
| 103 // |-commitPendingItem| is called. | 103 // |-commitPendingItem| is called. |
| 104 void AddPendingItem(const GURL& url, | 104 void AddPendingItem(const GURL& url, |
| 105 const web::Referrer& referrer, | 105 const web::Referrer& referrer, |
| 106 ui::PageTransition navigation_type, | 106 ui::PageTransition navigation_type, |
| 107 NavigationInitiationType initiation_type); | 107 NavigationInitiationType initiation_type); |
| 108 | 108 |
| 109 // Convenience accessors to get the underlying NavigationItems from the | |
| 110 // SessionEntries returned from |session_controller_|'s -lastUserEntry and | |
| 111 // -previousEntry methods. | |
| 112 // TODO(crbug.com/546365): Remove these methods. | |
| 113 NavigationItem* GetLastUserItem() const; | |
| 114 | |
| 115 // Temporary method. Returns a vector of NavigationItems corresponding to | 109 // Temporary method. Returns a vector of NavigationItems corresponding to |
| 116 // the SessionEntries of the uderlying CRWSessionController. | 110 // the SessionEntries of the uderlying CRWSessionController. |
| 117 // TODO(crbug.com/546365): Remove this method. | 111 // TODO(crbug.com/546365): Remove this method. |
| 118 NavigationItemList GetItems() const; | 112 NavigationItemList GetItems() const; |
| 119 | 113 |
| 120 // NavigationManager: | 114 // NavigationManager: |
| 121 BrowserState* GetBrowserState() const override; | 115 BrowserState* GetBrowserState() const override; |
| 122 WebState* GetWebState() const override; | 116 WebState* GetWebState() const override; |
| 123 NavigationItem* GetVisibleItem() const override; | 117 NavigationItem* GetVisibleItem() const override; |
| 124 NavigationItem* GetLastCommittedItem() const override; | 118 NavigationItem* GetLastCommittedItem() const override; |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 // List of transient url rewriters added by |AddTransientURLRewriter()|. | 194 // List of transient url rewriters added by |AddTransientURLRewriter()|. |
| 201 std::unique_ptr<std::vector<BrowserURLRewriter::URLRewriter>> | 195 std::unique_ptr<std::vector<BrowserURLRewriter::URLRewriter>> |
| 202 transient_url_rewriters_; | 196 transient_url_rewriters_; |
| 203 | 197 |
| 204 DISALLOW_COPY_AND_ASSIGN(NavigationManagerImpl); | 198 DISALLOW_COPY_AND_ASSIGN(NavigationManagerImpl); |
| 205 }; | 199 }; |
| 206 | 200 |
| 207 } // namespace web | 201 } // namespace web |
| 208 | 202 |
| 209 #endif // IOS_WEB_NAVIGATION_NAVIGATION_MANAGER_IMPL_H_ | 203 #endif // IOS_WEB_NAVIGATION_NAVIGATION_MANAGER_IMPL_H_ |
| OLD | NEW |