| 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 | 102 |
| 103 - (void)discardNonCommittedEntries; | 103 - (void)discardNonCommittedEntries; |
| 104 | 104 |
| 105 // Returns YES if there is a pending entry. | 105 // Returns YES if there is a pending entry. |
| 106 - (BOOL)hasPendingEntry; | 106 - (BOOL)hasPendingEntry; |
| 107 | 107 |
| 108 // Inserts history state from the given CRWSessionController to the front of | 108 // Inserts history state from the given CRWSessionController to the front of |
| 109 // this controller. | 109 // this controller. |
| 110 - (void)insertStateFromSessionController:(CRWSessionController*)otherController; | 110 - (void)insertStateFromSessionController:(CRWSessionController*)otherController; |
| 111 | 111 |
| 112 // Returns YES if there are entries to go with given delta. | |
| 113 - (BOOL)canGoDelta:(int)delta; | |
| 114 // Sets |currentNavigationIndex_| to the |index| if it's in the entries bounds. | 112 // Sets |currentNavigationIndex_| to the |index| if it's in the entries bounds. |
| 115 - (void)goToEntryAtIndex:(NSInteger)index; | 113 - (void)goToEntryAtIndex:(NSInteger)index; |
| 116 | 114 |
| 117 // Removes the entry at |index| after discarding any noncomitted entries. | 115 // Removes the entry at |index| after discarding any noncomitted entries. |
| 118 // |index| must not be the index of the last committed entry, or a noncomitted | 116 // |index| must not be the index of the last committed entry, or a noncomitted |
| 119 // entry. | 117 // entry. |
| 120 - (void)removeEntryAtIndex:(NSInteger)index; | 118 - (void)removeEntryAtIndex:(NSInteger)index; |
| 121 | 119 |
| 122 // Returns an array containing all of the non-redirected CRWSessionEntry objects | 120 // Returns an array containing all of the non-redirected CRWSessionEntry objects |
| 123 // whose index in |entries_| is less than |currentNavigationIndex_|. | 121 // whose index in |entries_| is less than |currentNavigationIndex_|. |
| (...skipping 20 matching lines...) Expand all Loading... |
| 144 - (void)useDesktopUserAgentForNextPendingEntry; | 142 - (void)useDesktopUserAgentForNextPendingEntry; |
| 145 | 143 |
| 146 // Returns the navigation index that differs from the current entry (or pending | 144 // Returns the navigation index that differs from the current entry (or pending |
| 147 // entry if it exists) by the specified |delta|, skipping redirect navigation | 145 // entry if it exists) by the specified |delta|, skipping redirect navigation |
| 148 // items. The index returned is not guaranteed to be valid. | 146 // items. The index returned is not guaranteed to be valid. |
| 149 - (NSInteger)indexOfEntryForDelta:(int)delta; | 147 - (NSInteger)indexOfEntryForDelta:(int)delta; |
| 150 | 148 |
| 151 @end | 149 @end |
| 152 | 150 |
| 153 #endif // IOS_WEB_NAVIGATION_CRW_SESSION_CONTROLLER_H_ | 151 #endif // IOS_WEB_NAVIGATION_CRW_SESSION_CONTROLLER_H_ |
| OLD | NEW |