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