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