| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_PUBLIC_CRW_NAVIGATION_MANAGER_STORAGE_H_ | 5 #ifndef IOS_WEB_PUBLIC_CRW_SESSION_STORAGE_H_ |
| 6 #define IOS_WEB_PUBLIC_CRW_NAVIGATION_MANAGER_STORAGE_H_ | 6 #define IOS_WEB_PUBLIC_CRW_SESSION_STORAGE_H_ |
| 7 | 7 |
| 8 #import <Foundation/Foundation.h> | 8 #import <Foundation/Foundation.h> |
| 9 #include <memory> |
| 9 | 10 |
| 10 @class CRWSessionCertificatePolicyManager; | 11 @class CRWSessionCertificatePolicyManager; |
| 11 | 12 |
| 12 // NSCoding-compliant class used to serialize NavigationManager's persisted | 13 namespace web { |
| 13 // properties. | 14 class SerializableUserData; |
| 15 } |
| 16 |
| 17 // NSCoding-compliant class used to serialize session state. |
| 14 // TODO(crbug.com/685388): Investigate using code from the sessions component. | 18 // TODO(crbug.com/685388): Investigate using code from the sessions component. |
| 15 @interface CRWNavigationManagerStorage : NSObject<NSCoding> | 19 @interface CRWSessionStorage : NSObject<NSCoding> |
| 16 | 20 |
| 17 @property(nonatomic, copy) NSString* tabID; | 21 @property(nonatomic, copy) NSString* tabID; |
| 18 @property(nonatomic, copy) NSString* openerID; | 22 @property(nonatomic, copy) NSString* openerID; |
| 19 @property(nonatomic, getter=isOpenedByDOM) BOOL openedByDOM; | 23 @property(nonatomic, getter=isOpenedByDOM) BOOL openedByDOM; |
| 20 @property(nonatomic, assign) NSInteger openerNavigationIndex; | 24 @property(nonatomic, assign) NSInteger openerNavigationIndex; |
| 21 @property(nonatomic, copy) NSString* windowName; | 25 @property(nonatomic, copy) NSString* windowName; |
| 22 @property(nonatomic, assign) NSInteger currentNavigationIndex; | 26 @property(nonatomic, assign) NSInteger currentNavigationIndex; |
| 23 @property(nonatomic, assign) NSInteger previousNavigationIndex; | 27 @property(nonatomic, assign) NSInteger previousNavigationIndex; |
| 24 @property(nonatomic, assign) NSTimeInterval lastVisitedTimestamp; | 28 @property(nonatomic, assign) NSTimeInterval lastVisitedTimestamp; |
| 25 @property(nonatomic, copy) NSArray* itemStorages; | 29 @property(nonatomic, copy) NSArray* itemStorages; |
| 26 @property(nonatomic, retain) | 30 @property(nonatomic, retain) |
| 27 CRWSessionCertificatePolicyManager* sessionCertificatePolicyManager; | 31 CRWSessionCertificatePolicyManager* sessionCertificatePolicyManager; |
| 32 @property(nonatomic, readonly) web::SerializableUserData* userData; |
| 33 |
| 34 // Setter for |userData|. The receiver takes ownership of |userData|. |
| 35 - (void)setSerializableUserData: |
| 36 (std::unique_ptr<web::SerializableUserData>)userData; |
| 28 | 37 |
| 29 @end | 38 @end |
| 30 | 39 |
| 31 #endif // IOS_WEB_PUBLIC_CRW_NAVIGATION_MANAGER_STORAGE_H_ | 40 #endif // IOS_WEB_PUBLIC_CRW_SESSION_STORAGE_H_ |
| OLD | NEW |