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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 // Keeps a strong reference to |session_controller|. | 60 // Keeps a strong reference to |session_controller|. |
61 // This method should only be called when deserializing |session_controller| | 61 // This method should only be called when deserializing |session_controller| |
62 // and joining it with its NavigationManager. Other cases should call | 62 // and joining it with its NavigationManager. Other cases should call |
63 // InitializeSession() or ReplaceSessionHistory(). | 63 // InitializeSession() or ReplaceSessionHistory(). |
64 // TODO(stuartmorgan): Also move deserialization of CRWSessionControllers | 64 // TODO(stuartmorgan): Also move deserialization of CRWSessionControllers |
65 // under the control of this class, and move the bulk of CRWSessionController | 65 // under the control of this class, and move the bulk of CRWSessionController |
66 // logic into it. | 66 // logic into it. |
67 void SetSessionController(CRWSessionController* session_controller); | 67 void SetSessionController(CRWSessionController* session_controller); |
68 | 68 |
69 // Initializes a new session history, supplying a unique |window_name| for the | 69 // Initializes a new session history, supplying a unique |window_name| for the |
70 // window (or nil). |opener_id| is the id of opener, or nil if there is none. | 70 // window (or nil). |opened_by_dom| is YES if the page was opened by DOM. |
71 // |opened_by_dom| is YES if the page was opened by DOM. | 71 void InitializeSession(NSString* window_name, BOOL opened_by_dom); |
72 // |opener_index| is the navigation index of the opener, or -1 if there is | |
73 // none. | |
74 void InitializeSession(NSString* window_name, | |
75 NSString* opener_id, | |
76 BOOL opened_by_dom, | |
77 int opener_navigation_index); | |
78 | 72 |
79 // Replace the session history with a new one, where |items| is the | 73 // Replace the session history with a new one, where |items| is the |
80 // complete set of navigation items in the new history, and |current_index| | 74 // complete set of navigation items in the new history, and |current_index| |
81 // is the index of the currently active item. | 75 // is the index of the currently active item. |
82 void ReplaceSessionHistory(std::vector<std::unique_ptr<NavigationItem>> items, | 76 void ReplaceSessionHistory(std::vector<std::unique_ptr<NavigationItem>> items, |
83 int current_index); | 77 int current_index); |
84 | 78 |
85 // Sets the delegate used to drive the navigation controller facade. | 79 // Sets the delegate used to drive the navigation controller facade. |
86 void SetFacadeDelegate(NavigationManagerFacadeDelegate* facade_delegate); | 80 void SetFacadeDelegate(NavigationManagerFacadeDelegate* facade_delegate); |
87 NavigationManagerFacadeDelegate* GetFacadeDelegate() const; | 81 NavigationManagerFacadeDelegate* GetFacadeDelegate() const; |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 // List of transient url rewriters added by |AddTransientURLRewriter()|. | 196 // List of transient url rewriters added by |AddTransientURLRewriter()|. |
203 std::unique_ptr<std::vector<BrowserURLRewriter::URLRewriter>> | 197 std::unique_ptr<std::vector<BrowserURLRewriter::URLRewriter>> |
204 transient_url_rewriters_; | 198 transient_url_rewriters_; |
205 | 199 |
206 DISALLOW_COPY_AND_ASSIGN(NavigationManagerImpl); | 200 DISALLOW_COPY_AND_ASSIGN(NavigationManagerImpl); |
207 }; | 201 }; |
208 | 202 |
209 } // namespace web | 203 } // namespace web |
210 | 204 |
211 #endif // IOS_WEB_NAVIGATION_NAVIGATION_MANAGER_IMPL_H_ | 205 #endif // IOS_WEB_NAVIGATION_NAVIGATION_MANAGER_IMPL_H_ |
OLD | NEW |