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