| 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 - (void)insertStateFromSessionController:(CRWSessionController*)otherController; | 110 - (void)insertStateFromSessionController:(CRWSessionController*)otherController; |
| 111 | 111 |
| 112 // Copies history state from the given CRWSessionController and adds it to this | 112 // Copies history state from the given CRWSessionController and adds it to this |
| 113 // controller. If |replaceState|, replaces the state of this controller with | 113 // controller. If |replaceState|, replaces the state of this controller with |
| 114 // the state of |otherSession|, instead of appending. | 114 // the state of |otherSession|, instead of appending. |
| 115 // DEPRECATED, use insertStateFromSessionController: instead. | 115 // DEPRECATED, use insertStateFromSessionController: instead. |
| 116 // TODO(crbug.com/664344): Remove this method. | 116 // TODO(crbug.com/664344): Remove this method. |
| 117 - (void)copyStateFromAndPrune:(CRWSessionController*)otherSession | 117 - (void)copyStateFromAndPrune:(CRWSessionController*)otherSession |
| 118 replaceState:(BOOL)replaceState; | 118 replaceState:(BOOL)replaceState; |
| 119 | 119 |
| 120 // Returns YES if there are entries to go back or forward to, given the | 120 // Returns YES if there are entries to go with given delta. |
| 121 // current entry. | |
| 122 - (BOOL)canGoBack; | |
| 123 - (BOOL)canGoForward; | |
| 124 - (BOOL)canGoDelta:(int)delta; | 121 - (BOOL)canGoDelta:(int)delta; |
| 125 // Calls goBack or goForward the appropriate number of times to adjust | 122 // Navigates to the entry with the given |delta|. |
| 126 // currentNavigationIndex_ by delta. | |
| 127 - (void)goDelta:(int)delta; | 123 - (void)goDelta:(int)delta; |
| 128 // Sets |currentNavigationIndex_| to the index of |entry| if |entries_| contains | 124 // Sets |currentNavigationIndex_| to the index of |entry| if |entries_| contains |
| 129 // |entry|. | 125 // |entry|. |
| 130 - (void)goToEntry:(CRWSessionEntry*)entry; | 126 - (void)goToEntry:(CRWSessionEntry*)entry; |
| 131 | 127 |
| 132 // Removes the entry at |index| after discarding any noncomitted entries. | 128 // Removes the entry at |index| after discarding any noncomitted entries. |
| 133 // |index| must not be the index of the last committed entry, or a noncomitted | 129 // |index| must not be the index of the last committed entry, or a noncomitted |
| 134 // entry. | 130 // entry. |
| 135 - (void)removeEntryAtIndex:(NSInteger)index; | 131 - (void)removeEntryAtIndex:(NSInteger)index; |
| 136 | 132 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 159 - (void)useDesktopUserAgentForNextPendingEntry; | 155 - (void)useDesktopUserAgentForNextPendingEntry; |
| 160 | 156 |
| 161 // Returns the navigation index that differs from the current entry by the | 157 // Returns the navigation index that differs from the current entry by the |
| 162 // specified |delta|, skipping redirect navigation items. The index returned is | 158 // specified |delta|, skipping redirect navigation items. The index returned is |
| 163 // not guaranteed to be valid. | 159 // not guaranteed to be valid. |
| 164 - (NSInteger)indexOfEntryForDelta:(int)delta; | 160 - (NSInteger)indexOfEntryForDelta:(int)delta; |
| 165 | 161 |
| 166 @end | 162 @end |
| 167 | 163 |
| 168 #endif // IOS_WEB_NAVIGATION_CRW_SESSION_CONTROLLER_H_ | 164 #endif // IOS_WEB_NAVIGATION_CRW_SESSION_CONTROLLER_H_ |
| OLD | NEW |