OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_CRW_SESSION_CONTROLLER_PRIVATE_CONSTRUCTORS_H_ | 5 #ifndef IOS_WEB_NAVIGATION_CRW_SESSION_CONTROLLER_PRIVATE_CONSTRUCTORS_H_ |
6 #define IOS_WEB_NAVIGATION_CRW_SESSION_CONTROLLER_PRIVATE_CONSTRUCTORS_H_ | 6 #define IOS_WEB_NAVIGATION_CRW_SESSION_CONTROLLER_PRIVATE_CONSTRUCTORS_H_ |
7 | 7 |
8 #import "ios/web/navigation/crw_session_controller.h" | |
9 | |
10 #include <memory> | 8 #include <memory> |
11 #include <vector> | 9 #include <vector> |
12 | 10 |
| 11 #import "ios/web/navigation/crw_session_controller.h" |
| 12 #include "ios/web/public/navigation_item_list.h" |
| 13 |
13 namespace web { | 14 namespace web { |
14 class BrowserState; | 15 class BrowserState; |
15 class NavigationItem; | 16 class NavigationItem; |
16 } | 17 } |
17 | 18 |
18 // Temporary interface for NavigationManager and tests to create | 19 // Temporary interface for NavigationManager and tests to create |
19 // CRWSessionControllers. Once CRWSessionController has no users outside of | 20 // CRWSessionControllers. Once CRWSessionController has no users outside of |
20 // web/, these methods can go back into session_controller.h. crbug.com/318974 | 21 // web/, these methods can go back into session_controller.h. crbug.com/318974 |
21 @interface CRWSessionController (PrivateConstructors) | 22 @interface CRWSessionController (PrivateConstructors) |
22 // Initializes a session controller, supplying a unique textual identifier for | 23 // Initializes a session controller, supplying a unique textual identifier for |
23 // the window, or nil. |opener| is the tab id of the parent tab. It may be | 24 // the window, or nil. |opener| is the tab id of the parent tab. It may be |
24 // nil or empty if there is no parent. | 25 // nil or empty if there is no parent. |
25 - (id)initWithWindowName:(NSString*)windowName | 26 - (id)initWithWindowName:(NSString*)windowName |
26 openerId:(NSString*)opener | 27 openerId:(NSString*)opener |
27 openedByDOM:(BOOL)openedByDOM | 28 openedByDOM:(BOOL)openedByDOM |
28 openerNavigationIndex:(NSInteger)openerIndex | 29 openerNavigationIndex:(NSInteger)openerIndex |
29 browserState:(web::BrowserState*)browserState; | 30 browserState:(web::BrowserState*)browserState; |
30 | 31 |
31 // Initializes a session controller, supplying a list of NavigationItem objects | 32 // Initializes a session controller, supplying a list of NavigationItem objects |
32 // and the current index in the navigation history. | 33 // and the current index in the navigation history. |
33 - (id)initWithNavigationItems: | 34 - (id)initWithNavigationItems:(web::ScopedNavigationItemList)items |
34 (std::vector<std::unique_ptr<web::NavigationItem>>)items | |
35 currentIndex:(NSUInteger)currentIndex | 35 currentIndex:(NSUInteger)currentIndex |
36 browserState:(web::BrowserState*)browserState; | 36 browserState:(web::BrowserState*)browserState; |
37 @end | 37 @end |
38 | 38 |
39 #endif // IOS_WEB_NAVIGATION_CRW_SESSION_CONTROLLER_PRIVATE_CONSTRUCTORS_H_ | 39 #endif // IOS_WEB_NAVIGATION_CRW_SESSION_CONTROLLER_PRIVATE_CONSTRUCTORS_H_ |
OLD | NEW |