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

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

Issue 2482983003: Reland: [ios] Refactored back-forward navigation in CRWSessionController. (Closed)
Patch Set: Fix 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
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;
117 // Adjusts the current entry to reflect the navigation in the corresponding 118 // Adjusts the current entry to reflect the navigation in the corresponding
118 // direction in history. 119 // direction in history.
119 - (void)goBack; 120 - (void)goBack;
120 - (void)goForward; 121 - (void)goForward;
121 // Calls goBack or goForward the appropriate number of times to adjust 122 // Calls goBack or goForward the appropriate number of times to adjust
122 // currentNavigationIndex_ by delta. 123 // currentNavigationIndex_ by delta.
123 - (void)goDelta:(int)delta; 124 - (void)goDelta:(int)delta;
124 // Sets |currentNavigationIndex_| to the index of |entry| if |entries_| contains 125 // Sets |currentNavigationIndex_| to the index of |entry| if |entries_| contains
125 // |entry|. 126 // |entry|.
126 - (void)goToEntry:(CRWSessionEntry*)entry; 127 - (void)goToEntry:(CRWSessionEntry*)entry;
(...skipping 20 matching lines...) Expand all
147 andEntry:(CRWSessionEntry*)secondEntry; 148 andEntry:(CRWSessionEntry*)secondEntry;
148 149
149 // Find the most recent session entry that is not a redirect. Returns nil if 150 // Find the most recent session entry that is not a redirect. Returns nil if
150 // |entries_| is empty. 151 // |entries_| is empty.
151 - (CRWSessionEntry*)lastUserEntry; 152 - (CRWSessionEntry*)lastUserEntry;
152 153
153 // Set |useDesktopUserAgentForNextPendingEntry_| to YES if there is no pending 154 // Set |useDesktopUserAgentForNextPendingEntry_| to YES if there is no pending
154 // entry, otherwise set |useDesktopUserAgent| in the pending entry. 155 // entry, otherwise set |useDesktopUserAgent| in the pending entry.
155 - (void)useDesktopUserAgentForNextPendingEntry; 156 - (void)useDesktopUserAgentForNextPendingEntry;
156 157
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
157 @end 163 @end
158 164
159 #endif // IOS_WEB_NAVIGATION_CRW_SESSION_CONTROLLER_H_ 165 #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') | ios/web/navigation/crw_session_controller.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698