| 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_CONTROLLER_H_ | 5 #ifndef IOS_WEB_NAVIGATION_CRW_SESSION_CONTROLLER_H_ |
| 6 #define IOS_WEB_NAVIGATION_CRW_SESSION_CONTROLLER_H_ | 6 #define IOS_WEB_NAVIGATION_CRW_SESSION_CONTROLLER_H_ |
| 7 | 7 |
| 8 #import <Foundation/Foundation.h> | 8 #import <Foundation/Foundation.h> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "ui/base/page_transition_types.h" | 11 #include "ui/base/page_transition_types.h" |
| 12 #include "url/gurl.h" | 12 #include "url/gurl.h" |
| 13 | 13 |
| 14 @class CRWSessionEntry; | 14 @class CRWSessionEntry; |
| 15 @class CRWSessionCertificatePolicyManager; | 15 @class CRWSessionCertificatePolicyManager; |
| 16 | 16 |
| 17 namespace web { | 17 namespace web { |
| 18 class NavigationManagerImpl; | 18 class NavigationManagerImpl; |
| 19 struct Referrer; | 19 struct Referrer; |
| 20 } | 20 } |
| 21 | 21 |
| 22 // A CRWSessionController is similar to a NavigationController object in desktop | 22 // A CRWSessionController is similar to a NavigationController object in desktop |
| 23 // Chrome. It maintains information needed to save/restore a tab with its | 23 // Chrome. It maintains information needed to save/restore a tab with its |
| 24 // complete session history. There is one of these for each tab. | 24 // complete session history. There is one of these for each tab. |
| 25 // 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. |
| 26 // Use web::NavigationManager instead. | 26 // Use web::NavigationManager instead. |
| 27 // TODO(crbug.com/454984): Remove this class. | 27 // TODO(crbug.com/454984): Remove this class. |
| 28 @interface CRWSessionController : NSObject<NSCoding, NSCopying> | 28 @interface CRWSessionController : NSObject<NSCopying> |
| 29 | 29 |
| 30 @property(nonatomic, readonly, copy) NSString* tabId; | 30 @property(nonatomic, readonly, copy) NSString* tabId; |
| 31 @property(nonatomic, readonly, assign) NSInteger currentNavigationIndex; | 31 @property(nonatomic, readonly, assign) NSInteger currentNavigationIndex; |
| 32 @property(nonatomic, readonly, assign) NSInteger previousNavigationIndex; | 32 @property(nonatomic, readonly, assign) NSInteger previousNavigationIndex; |
| 33 // The index of the pending entry if it is in entries_, or -1 if pendingEntry is | 33 // The index of the pending entry if it is in entries_, or -1 if pendingEntry is |
| 34 // a new entry (created by addPendingEntry:). | 34 // a new entry (created by addPendingEntry:). |
| 35 @property(nonatomic, readwrite, assign) NSInteger pendingEntryIndex; | 35 @property(nonatomic, readwrite, assign) NSInteger pendingEntryIndex; |
| 36 @property(nonatomic, readonly, strong) NSArray* entries; | 36 @property(nonatomic, readonly, strong) NSArray* entries; |
| 37 @property(nonatomic, copy) NSString* windowName; | 37 @property(nonatomic, copy) NSString* windowName; |
| 38 // Indicates whether the page was opened by DOM (e.g. with |window.open| | 38 // Indicates whether the page was opened by DOM (e.g. with |window.open| |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 // |entries_| is empty. | 134 // |entries_| is empty. |
| 135 - (CRWSessionEntry*)lastUserEntry; | 135 - (CRWSessionEntry*)lastUserEntry; |
| 136 | 136 |
| 137 // Set |useDesktopUserAgentForNextPendingEntry_| to YES if there is no pending | 137 // Set |useDesktopUserAgentForNextPendingEntry_| to YES if there is no pending |
| 138 // entry, otherwise set |useDesktopUserAgent| in the pending entry. | 138 // entry, otherwise set |useDesktopUserAgent| in the pending entry. |
| 139 - (void)useDesktopUserAgentForNextPendingEntry; | 139 - (void)useDesktopUserAgentForNextPendingEntry; |
| 140 | 140 |
| 141 @end | 141 @end |
| 142 | 142 |
| 143 #endif // IOS_WEB_NAVIGATION_CRW_SESSION_CONTROLLER_H_ | 143 #endif // IOS_WEB_NAVIGATION_CRW_SESSION_CONTROLLER_H_ |
| OLD | NEW |