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

Unified Diff: ios/web/navigation/crw_session_controller.h

Issue 2766063002: Remove the concept of currentItemIndex (Closed)
Patch Set: fix unit tests Created 3 years, 9 months 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 side-by-side diff with in-line comments
Download patch
Index: ios/web/navigation/crw_session_controller.h
diff --git a/ios/web/navigation/crw_session_controller.h b/ios/web/navigation/crw_session_controller.h
index a230bfe673fa1c88c1dc1a19d5121b894260b25f..f053dd14e6f26c393f0064264bfacbe2292d0b56 100644
--- a/ios/web/navigation/crw_session_controller.h
+++ b/ios/web/navigation/crw_session_controller.h
@@ -30,8 +30,8 @@ struct Referrer;
// TODO(crbug.com/454984): Remove this class.
@interface CRWSessionController : NSObject
-@property(nonatomic, readonly, assign) NSInteger currentNavigationIndex;
-@property(nonatomic, readonly, assign) NSInteger previousNavigationIndex;
+@property(nonatomic, readonly, assign) NSInteger lastCommittedItemIndex;
+@property(nonatomic, readonly, assign) NSInteger previousItemIndex;
// The index of the pending item if it is in |items|, or -1 if |pendingItem|
// corresponds with a new navigation (created by addPendingItem:).
@property(nonatomic, readwrite, assign) NSInteger pendingItemIndex;
@@ -66,10 +66,10 @@ struct Referrer;
// Returns the NavigationItem corresponding with the previously loaded page.
@property(nonatomic, readonly) web::NavigationItemImpl* previousItem;
// Returns a list of all non-redirected NavigationItems whose index precedes
-// |currentNavigationIndex|.
+// |lastCommittedItemIndex|.
@property(nonatomic, readonly) web::NavigationItemList backwardItems;
// Returns a list of all non-redirected NavigationItems whose index follow
-// |currentNavigationIndex|.
+// |lastCommittedItemIndex|.
@property(nonatomic, readonly) web::NavigationItemList forwardItems;
// CRWSessionController doesn't have public constructors. New
@@ -133,7 +133,7 @@ struct Referrer;
// |canPruneAllButLastCommittedItem| is false.
- (void)copyStateFromSessionControllerAndPrune:(CRWSessionController*)source;
-// Sets |currentNavigationIndex_| to the |index| if it's in the entries bounds.
+// Sets |lastCommittedItemIndex| to the |index| if it's in the entries bounds.
- (void)goToItemAtIndex:(NSInteger)index;
// Removes the item at |index| after discarding any noncomitted entries.
« no previous file with comments | « ios/shared/chrome/browser/tabs/web_state_list_unittest.mm ('k') | ios/web/navigation/crw_session_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698