Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(254)

Side by Side Diff: ios/web/navigation/crw_session_controller.h

Issue 2488553004: Revert of [ios] Refactored back-forward navigation in CRWSessionController. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | ios/web/navigation/crw_session_controller.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 // Copies history state from the given CRWSessionController and adds it to this 107 // Copies history state from the given CRWSessionController and adds it to this
108 // controller. If |replaceState|, replaces the state of this controller with 108 // controller. If |replaceState|, replaces the state of this controller with
109 // the state of |otherSession|, instead of appending. 109 // the state of |otherSession|, instead of appending.
110 - (void)copyStateFromAndPrune:(CRWSessionController*)otherSession 110 - (void)copyStateFromAndPrune:(CRWSessionController*)otherSession
111 replaceState:(BOOL)replaceState; 111 replaceState:(BOOL)replaceState;
112 112
113 // Returns YES if there are entries to go back or forward to, given the 113 // Returns YES if there are entries to go back or forward to, given the
114 // current entry. 114 // current entry.
115 - (BOOL)canGoBack; 115 - (BOOL)canGoBack;
116 - (BOOL)canGoForward; 116 - (BOOL)canGoForward;
117 - (BOOL)canGoDelta:(int)delta;
118 // Adjusts the current entry to reflect the navigation in the corresponding 117 // Adjusts the current entry to reflect the navigation in the corresponding
119 // direction in history. 118 // direction in history.
120 - (void)goBack; 119 - (void)goBack;
121 - (void)goForward; 120 - (void)goForward;
122 // Calls goBack or goForward the appropriate number of times to adjust 121 // Calls goBack or goForward the appropriate number of times to adjust
123 // currentNavigationIndex_ by delta. 122 // currentNavigationIndex_ by delta.
124 - (void)goDelta:(int)delta; 123 - (void)goDelta:(int)delta;
125 // Sets |currentNavigationIndex_| to the index of |entry| if |entries_| contains 124 // Sets |currentNavigationIndex_| to the index of |entry| if |entries_| contains
126 // |entry|. 125 // |entry|.
127 - (void)goToEntry:(CRWSessionEntry*)entry; 126 - (void)goToEntry:(CRWSessionEntry*)entry;
(...skipping 20 matching lines...) Expand all
148 andEntry:(CRWSessionEntry*)secondEntry; 147 andEntry:(CRWSessionEntry*)secondEntry;
149 148
150 // Find the most recent session entry that is not a redirect. Returns nil if 149 // Find the most recent session entry that is not a redirect. Returns nil if
151 // |entries_| is empty. 150 // |entries_| is empty.
152 - (CRWSessionEntry*)lastUserEntry; 151 - (CRWSessionEntry*)lastUserEntry;
153 152
154 // Set |useDesktopUserAgentForNextPendingEntry_| to YES if there is no pending 153 // Set |useDesktopUserAgentForNextPendingEntry_| to YES if there is no pending
155 // entry, otherwise set |useDesktopUserAgent| in the pending entry. 154 // entry, otherwise set |useDesktopUserAgent| in the pending entry.
156 - (void)useDesktopUserAgentForNextPendingEntry; 155 - (void)useDesktopUserAgentForNextPendingEntry;
157 156
158 // Returns the navigation index that differs from the current entry by the
159 // specified |delta|, skipping redirect navigation items. The index returned is
160 // not guaranteed to be valid.
161 - (NSInteger)indexOfEntryForDelta:(int)delta;
162
163 @end 157 @end
164 158
165 #endif // IOS_WEB_NAVIGATION_CRW_SESSION_CONTROLLER_H_ 159 #endif // IOS_WEB_NAVIGATION_CRW_SESSION_CONTROLLER_H_
OLDNEW
« no previous file with comments | « no previous file | ios/web/navigation/crw_session_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698