| 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_SESSION_STORAGE_H_ | 5 #ifndef IOS_WEB_PUBLIC_CRW_SESSION_STORAGE_H_ |
| 6 #define IOS_WEB_PUBLIC_CRW_SESSION_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 #include <memory> |
| 10 | 10 |
| 11 @class CRWSessionCertificatePolicyManager; | 11 @class CRWSessionCertificatePolicyManager; |
| 12 | 12 |
| 13 namespace web { | 13 namespace web { |
| 14 class SerializableUserData; | 14 class SerializableUserData; |
| 15 } | 15 } |
| 16 | 16 |
| 17 // NSCoding-compliant class used to serialize session state. | 17 // NSCoding-compliant class used to serialize session state. |
| 18 // TODO(crbug.com/685388): Investigate using code from the sessions component. | 18 // TODO(crbug.com/685388): Investigate using code from the sessions component. |
| 19 @interface CRWSessionStorage : NSObject<NSCoding> | 19 @interface CRWSessionStorage : NSObject<NSCoding> |
| 20 | 20 |
| 21 @property(nonatomic, getter=isOpenedByDOM) BOOL openedByDOM; | 21 @property(nonatomic, assign) BOOL hasOpener; |
| 22 @property(nonatomic, assign) NSInteger currentNavigationIndex; | 22 @property(nonatomic, assign) NSInteger currentNavigationIndex; |
| 23 @property(nonatomic, assign) NSInteger previousNavigationIndex; | 23 @property(nonatomic, assign) NSInteger previousNavigationIndex; |
| 24 @property(nonatomic, copy) NSArray* itemStorages; | 24 @property(nonatomic, copy) NSArray* itemStorages; |
| 25 @property(nonatomic, retain) | 25 @property(nonatomic, retain) |
| 26 CRWSessionCertificatePolicyManager* sessionCertificatePolicyManager; | 26 CRWSessionCertificatePolicyManager* sessionCertificatePolicyManager; |
| 27 @property(nonatomic, readonly) web::SerializableUserData* userData; | 27 @property(nonatomic, readonly) web::SerializableUserData* userData; |
| 28 | 28 |
| 29 // Setter for |userData|. The receiver takes ownership of |userData|. | 29 // Setter for |userData|. The receiver takes ownership of |userData|. |
| 30 - (void)setSerializableUserData: | 30 - (void)setSerializableUserData: |
| 31 (std::unique_ptr<web::SerializableUserData>)userData; | 31 (std::unique_ptr<web::SerializableUserData>)userData; |
| 32 | 32 |
| 33 @end | 33 @end |
| 34 | 34 |
| 35 #endif // IOS_WEB_PUBLIC_CRW_SESSION_STORAGE_H_ | 35 #endif // IOS_WEB_PUBLIC_CRW_SESSION_STORAGE_H_ |
| OLD | NEW |