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

Unified Diff: ios/chrome/browser/tabs/tab_model_order_controller.mm

Issue 2699833004: Add WebStateListOrderController to control WebState insertion. (Closed)
Patch Set: Address comments. Created 3 years, 10 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/chrome/browser/tabs/tab_model_order_controller.mm
diff --git a/ios/chrome/browser/tabs/tab_model_order_controller.mm b/ios/chrome/browser/tabs/tab_model_order_controller.mm
index 0eb1f32d76a504000b4924dde1c85f04fb85251c..4ffa338fb18b4aa51e355788a028b8b0e966ed33 100644
--- a/ios/chrome/browser/tabs/tab_model_order_controller.mm
+++ b/ios/chrome/browser/tabs/tab_model_order_controller.mm
@@ -21,33 +21,6 @@
return self;
}
-- (NSUInteger)insertionIndexForTab:(Tab*)newTab
- transition:(ui::PageTransition)transition
- opener:(Tab*)parentTab
- adjacency:(TabModelOrderConstants::InsertionAdjacency)
- adjacency {
- if (model_.isEmpty)
- return 0;
-
- if (!parentTab)
- return [self insertionIndexForAppending];
-
- if (!PageTransitionCoreTypeIs(transition, ui::PAGE_TRANSITION_LINK))
- return [self insertionIndexForAppending];
-
- NSUInteger referenceIndex = [model_ indexOfTab:parentTab];
- Tab* openLocation = [model_ lastTabWithOpener:parentTab];
- if (openLocation)
- referenceIndex = [model_ indexOfTab:openLocation];
-
- DCHECK_NE(referenceIndex, static_cast<NSUInteger>(NSNotFound));
- return referenceIndex + 1;
-}
-
-- (NSUInteger)insertionIndexForAppending {
- return model_.count;
-}
-
- (Tab*)determineNewSelectedTabFromRemovedTab:(Tab*)removedTab {
// While the desktop version of this code deals in indices, this deals in
// actual tabs. As a result, the tab only needs to change iff the selection
« no previous file with comments | « ios/chrome/browser/tabs/tab_model_order_controller.h ('k') | ios/chrome/browser/tabs/tab_model_order_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698