| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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_ENTRY_H_ | 5 #ifndef IOS_WEB_NAVIGATION_CRW_SESSION_ENTRY_H_ |
| 6 #define IOS_WEB_NAVIGATION_CRW_SESSION_ENTRY_H_ | 6 #define IOS_WEB_NAVIGATION_CRW_SESSION_ENTRY_H_ |
| 7 | 7 |
| 8 #import <Foundation/Foundation.h> | 8 #import <Foundation/Foundation.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| 11 #include <memory> |
| 12 |
| 11 #include "base/strings/string16.h" | 13 #include "base/strings/string16.h" |
| 12 #include "base/time/time.h" | 14 #include "base/time/time.h" |
| 13 #include "ui/base/page_transition_types.h" | 15 #include "ui/base/page_transition_types.h" |
| 14 #include "url/gurl.h" | 16 #include "url/gurl.h" |
| 15 | 17 |
| 16 namespace web { | 18 namespace web { |
| 17 class NavigationItem; | 19 class NavigationItem; |
| 18 class NavigationItemImpl; | 20 class NavigationItemImpl; |
| 19 } | 21 } |
| 20 | 22 |
| 21 // A CRWSessionEntry is similar to a NavigationEntry object in desktop Chrome. | 23 // A CRWSessionEntry is similar to a NavigationEntry object in desktop Chrome. |
| 22 // It maintains the information needed to save/restore a single entry in session | 24 // It maintains the information needed to save/restore a single entry in session |
| 23 // history (i.e., one site) for a tab. A tab may have multiple of these objects | 25 // history (i.e., one site) for a tab. A tab may have multiple of these objects |
| 24 // comprising its entire session history. | 26 // comprising its entire session history. |
| 25 // DEPRECATED, do not use this class and do not add any methods to it. | 27 // DEPRECATED, do not use this class and do not add any methods to it. |
| 26 // Use web::NavigationItem instead. | 28 // Use web::NavigationItem instead. |
| 27 // TODO(crbug.com/454984): Remove this class. | 29 // TODO(crbug.com/454984): Remove this class. |
| 28 @interface CRWSessionEntry : NSObject | 30 @interface CRWSessionEntry : NSObject<NSCopying> |
| 29 | 31 |
| 30 // Pointer to the NavigationItem associated with this CRWSessionEntry. | 32 // Pointer to the NavigationItem associated with this CRWSessionEntry. |
| 31 // Eventually, this will replace CRWSessionEntry entirely. | 33 // Eventually, this will replace CRWSessionEntry entirely. |
| 32 @property(nonatomic, readonly) web::NavigationItem* navigationItem; | 34 @property(nonatomic, readonly) web::NavigationItem* navigationItem; |
| 33 | 35 |
| 34 // Pointer to the NavigationItemImpl associated with this CRWSessionEntry. | 36 // Pointer to the NavigationItemImpl associated with this CRWSessionEntry. |
| 35 @property(nonatomic, readonly) web::NavigationItemImpl* navigationItemImpl; | 37 @property(nonatomic, readonly) web::NavigationItemImpl* navigationItemImpl; |
| 36 | 38 |
| 37 // Initialize the session entry with the given NavigationItem. | 39 // Initialize the session entry with the given NavigationItem. |
| 38 - (instancetype)initWithNavigationItem:(web::NavigationItem*)item; | 40 - (instancetype)initWithNavigationItem: |
| 41 (std::unique_ptr<web::NavigationItem>)item; |
| 39 | 42 |
| 40 @end | 43 @end |
| 41 | 44 |
| 42 #endif // IOS_WEB_NAVIGATION_CRW_SESSION_ENTRY_H_ | 45 #endif // IOS_WEB_NAVIGATION_CRW_SESSION_ENTRY_H_ |
| OLD | NEW |