| 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 BrowserState; |
| 18 class NavigationManagerImpl; | 19 class NavigationManagerImpl; |
| 19 struct Referrer; | 20 struct Referrer; |
| 20 } | 21 } |
| 21 | 22 |
| 22 // A CRWSessionController is similar to a NavigationController object in desktop | 23 // A CRWSessionController is similar to a NavigationController object in desktop |
| 23 // Chrome. It maintains information needed to save/restore a tab with its | 24 // Chrome. It maintains information needed to save/restore a tab with its |
| 24 // complete session history. There is one of these for each tab. | 25 // 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. | 26 // DEPRECATED, do not use this class and do not add any methods to it. |
| 26 // Use web::NavigationManager instead. | 27 // Use web::NavigationManager instead. |
| 27 // TODO(crbug.com/454984): Remove this class. | 28 // TODO(crbug.com/454984): Remove this class. |
| (...skipping 28 matching lines...) Expand all Loading... |
| 56 @property(nonatomic, assign) NSTimeInterval lastVisitedTimestamp; | 57 @property(nonatomic, assign) NSTimeInterval lastVisitedTimestamp; |
| 57 @property(nonatomic, readonly, copy) NSString* openerId; | 58 @property(nonatomic, readonly, copy) NSString* openerId; |
| 58 @property(nonatomic, readonly, assign) NSInteger openerNavigationIndex; | 59 @property(nonatomic, readonly, assign) NSInteger openerNavigationIndex; |
| 59 | 60 |
| 60 // CRWSessionController doesn't have public constructors. New | 61 // CRWSessionController doesn't have public constructors. New |
| 61 // CRWSessionControllers are created by deserialization, or via a | 62 // CRWSessionControllers are created by deserialization, or via a |
| 62 // NavigationManager. | 63 // NavigationManager. |
| 63 | 64 |
| 64 // Sets the corresponding NavigationManager. | 65 // Sets the corresponding NavigationManager. |
| 65 - (void)setNavigationManager:(web::NavigationManagerImpl*)navigationManager; | 66 - (void)setNavigationManager:(web::NavigationManagerImpl*)navigationManager; |
| 67 // Sets the corresponding BrowserState. |
| 68 - (void)setBrowserState:(web::BrowserState*)browserState; |
| 66 | 69 |
| 67 // Add a new entry with the given url, referrer, and navigation type, making it | 70 // Add a new entry with the given url, referrer, and navigation type, making it |
| 68 // the current entry. If |url| is the same as the current entry's url, this | 71 // the current entry. If |url| is the same as the current entry's url, this |
| 69 // does nothing. |referrer| may be nil if there isn't one. The entry starts | 72 // does nothing. |referrer| may be nil if there isn't one. The entry starts |
| 70 // out as pending, and will be lost unless |-commitPendingEntry| is called. | 73 // out as pending, and will be lost unless |-commitPendingEntry| is called. |
| 71 - (void)addPendingEntry:(const GURL&)url | 74 - (void)addPendingEntry:(const GURL&)url |
| 72 referrer:(const web::Referrer&)referrer | 75 referrer:(const web::Referrer&)referrer |
| 73 transition:(ui::PageTransition)type | 76 transition:(ui::PageTransition)type |
| 74 rendererInitiated:(BOOL)rendererInitiated; | 77 rendererInitiated:(BOOL)rendererInitiated; |
| 75 | 78 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 // |entries_| is empty. | 137 // |entries_| is empty. |
| 135 - (CRWSessionEntry*)lastUserEntry; | 138 - (CRWSessionEntry*)lastUserEntry; |
| 136 | 139 |
| 137 // Set |useDesktopUserAgentForNextPendingEntry_| to YES if there is no pending | 140 // Set |useDesktopUserAgentForNextPendingEntry_| to YES if there is no pending |
| 138 // entry, otherwise set |useDesktopUserAgent| in the pending entry. | 141 // entry, otherwise set |useDesktopUserAgent| in the pending entry. |
| 139 - (void)useDesktopUserAgentForNextPendingEntry; | 142 - (void)useDesktopUserAgentForNextPendingEntry; |
| 140 | 143 |
| 141 @end | 144 @end |
| 142 | 145 |
| 143 #endif // IOS_WEB_NAVIGATION_CRW_SESSION_CONTROLLER_H_ | 146 #endif // IOS_WEB_NAVIGATION_CRW_SESSION_CONTROLLER_H_ |
| OLD | NEW |