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

Unified Diff: ios/shared/chrome/browser/tabs/web_state_list_order_controller.h

Issue 2703333006: Move the notion of current Tab from TabModel to WebStateList. (Closed)
Patch Set: Rebase. 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/shared/chrome/browser/tabs/web_state_list_order_controller.h
diff --git a/ios/shared/chrome/browser/tabs/web_state_list_order_controller.h b/ios/shared/chrome/browser/tabs/web_state_list_order_controller.h
index a4dcd94d7afa28e706346289bbbd0c7c2d44adbc..5422c8ffa2d02e66f3c932b72537f2e5404ac284 100644
--- a/ios/shared/chrome/browser/tabs/web_state_list_order_controller.h
+++ b/ios/shared/chrome/browser/tabs/web_state_list_order_controller.h
@@ -26,7 +26,15 @@ class WebStateListOrderController {
int DetermineInsertionIndex(ui::PageTransition transition,
web::WebState* opener) const;
+ // Determines where to shift the active index after a WebState is closed.
+ int DetermineNewActiveIndex(int removing_index) const;
+
private:
+ // Returns a valid index to be selected after the WebState at |removing_index|
+ // is detached, adjusting |index| to reflect that |removing_index| is going
+ // away.
+ int GetValidIndex(int index, int removing_index) const;
+
WebStateList* web_state_list_;
DISALLOW_COPY_AND_ASSIGN(WebStateListOrderController);

Powered by Google App Engine
This is Rietveld 408576698