| 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 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 } | 23 } |
| 24 | 24 |
| 25 // A CRWSessionController is similar to a NavigationController object in desktop | 25 // A CRWSessionController is similar to a NavigationController object in desktop |
| 26 // Chrome. It maintains information needed to save/restore a tab with its | 26 // Chrome. It maintains information needed to save/restore a tab with its |
| 27 // complete session history. There is one of these for each tab. | 27 // complete session history. There is one of these for each tab. |
| 28 // DEPRECATED, do not use this class and do not add any methods to it. | 28 // DEPRECATED, do not use this class and do not add any methods to it. |
| 29 // Use web::NavigationManager instead. | 29 // Use web::NavigationManager instead. |
| 30 // TODO(crbug.com/454984): Remove this class. | 30 // TODO(crbug.com/454984): Remove this class. |
| 31 @interface CRWSessionController : NSObject<NSCopying> | 31 @interface CRWSessionController : NSObject<NSCopying> |
| 32 | 32 |
| 33 @property(nonatomic, readonly, copy) NSString* tabId; | |
| 34 @property(nonatomic, readonly, assign) NSInteger currentNavigationIndex; | 33 @property(nonatomic, readonly, assign) NSInteger currentNavigationIndex; |
| 35 @property(nonatomic, readonly, assign) NSInteger previousNavigationIndex; | 34 @property(nonatomic, readonly, assign) NSInteger previousNavigationIndex; |
| 36 // The index of the pending item if it is in |items|, or -1 if |pendingItem| | 35 // The index of the pending item if it is in |items|, or -1 if |pendingItem| |
| 37 // corresponds with a new navigation (created by addPendingItem:). | 36 // corresponds with a new navigation (created by addPendingItem:). |
| 38 @property(nonatomic, readwrite, assign) NSInteger pendingItemIndex; | 37 @property(nonatomic, readwrite, assign) NSInteger pendingItemIndex; |
| 39 @property(nonatomic, copy) NSString* windowName; | 38 @property(nonatomic, copy) NSString* windowName; |
| 40 // Indicates whether the page was opened by DOM (e.g. with |window.open| | 39 // Indicates whether the page was opened by DOM (e.g. with |window.open| |
| 41 // JavaScript call or by clicking a link with |_blank| target). | 40 // JavaScript call or by clicking a link with |_blank| target). |
| 42 @property(nonatomic, readonly, getter=isOpenedByDOM) BOOL openedByDOM; | 41 @property(nonatomic, readonly, getter=isOpenedByDOM) BOOL openedByDOM; |
| 43 @property(nonatomic, readonly, strong) | 42 @property(nonatomic, readonly, strong) |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 // Set |useDesktopUserAgentForNextPendingItem_| to YES if there is no pending | 155 // Set |useDesktopUserAgentForNextPendingItem_| to YES if there is no pending |
| 157 // entry, otherwise set |useDesktopUserAgent| in the pending entry. | 156 // entry, otherwise set |useDesktopUserAgent| in the pending entry. |
| 158 - (void)useDesktopUserAgentForNextPendingItem; | 157 - (void)useDesktopUserAgentForNextPendingItem; |
| 159 | 158 |
| 160 // Returns the index of |item| in |items|. | 159 // Returns the index of |item| in |items|. |
| 161 - (NSInteger)indexOfItem:(web::NavigationItem*)item; | 160 - (NSInteger)indexOfItem:(web::NavigationItem*)item; |
| 162 | 161 |
| 163 @end | 162 @end |
| 164 | 163 |
| 165 #endif // IOS_WEB_NAVIGATION_CRW_SESSION_CONTROLLER_H_ | 164 #endif // IOS_WEB_NAVIGATION_CRW_SESSION_CONTROLLER_H_ |
| OLD | NEW |