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