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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 | 173 |
174 private: | 174 private: |
175 // The SessionStorageBuilder functions require access to private variables of | 175 // The SessionStorageBuilder functions require access to private variables of |
176 // NavigationManagerImpl. | 176 // NavigationManagerImpl. |
177 friend SessionStorageBuilder; | 177 friend SessionStorageBuilder; |
178 | 178 |
179 // Returns true if the PageTransition for the underlying navigation item at | 179 // Returns true if the PageTransition for the underlying navigation item at |
180 // |index| has ui::PAGE_TRANSITION_IS_REDIRECT_MASK. | 180 // |index| has ui::PAGE_TRANSITION_IS_REDIRECT_MASK. |
181 bool IsRedirectItemAtIndex(int index) const; | 181 bool IsRedirectItemAtIndex(int index) const; |
182 | 182 |
| 183 // Returns the most recent NavigationItem that does not have an app-specific |
| 184 // URL. |
| 185 NavigationItem* GetLastCommittedWebItem() const; |
| 186 |
183 // If true, override navigation item's useDesktopUserAgent flag and always | 187 // If true, override navigation item's useDesktopUserAgent flag and always |
184 // create the pending entry using the desktop user agent. | 188 // create the pending entry using the desktop user agent. |
185 // TODO(crbug.com/692303): Remove this when overriding the user agent doesn't | 189 // TODO(crbug.com/692303): Remove this when overriding the user agent doesn't |
186 // create a new NavigationItem. | 190 // create a new NavigationItem. |
187 bool override_desktop_user_agent_for_next_pending_item_; | 191 bool override_desktop_user_agent_for_next_pending_item_; |
188 | 192 |
189 // The primary delegate for this manager. | 193 // The primary delegate for this manager. |
190 NavigationManagerDelegate* delegate_; | 194 NavigationManagerDelegate* delegate_; |
191 | 195 |
192 // The BrowserState that is associated with this instance. | 196 // The BrowserState that is associated with this instance. |
193 BrowserState* browser_state_; | 197 BrowserState* browser_state_; |
194 | 198 |
195 // CRWSessionController that backs this instance. | 199 // CRWSessionController that backs this instance. |
196 // TODO(stuartmorgan): Fold CRWSessionController into this class. | 200 // TODO(stuartmorgan): Fold CRWSessionController into this class. |
197 base::scoped_nsobject<CRWSessionController> session_controller_; | 201 base::scoped_nsobject<CRWSessionController> session_controller_; |
198 | 202 |
199 // Weak pointer to the facade delegate. | 203 // Weak pointer to the facade delegate. |
200 NavigationManagerFacadeDelegate* facade_delegate_; | 204 NavigationManagerFacadeDelegate* facade_delegate_; |
201 | 205 |
202 // List of transient url rewriters added by |AddTransientURLRewriter()|. | 206 // List of transient url rewriters added by |AddTransientURLRewriter()|. |
203 std::unique_ptr<std::vector<BrowserURLRewriter::URLRewriter>> | 207 std::unique_ptr<std::vector<BrowserURLRewriter::URLRewriter>> |
204 transient_url_rewriters_; | 208 transient_url_rewriters_; |
205 | 209 |
206 DISALLOW_COPY_AND_ASSIGN(NavigationManagerImpl); | 210 DISALLOW_COPY_AND_ASSIGN(NavigationManagerImpl); |
207 }; | 211 }; |
208 | 212 |
209 } // namespace web | 213 } // namespace web |
210 | 214 |
211 #endif // IOS_WEB_NAVIGATION_NAVIGATION_MANAGER_IMPL_H_ | 215 #endif // IOS_WEB_NAVIGATION_NAVIGATION_MANAGER_IMPL_H_ |
OLD | NEW |