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

Unified Diff: ios/clean/chrome/browser/ui/tab_collection/tab_collection_consumer.h

Issue 2904053002: [ios] Active web state observer in tab collection. (Closed)
Patch Set: Update unittest Created 3 years, 7 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/clean/chrome/browser/ui/tab_collection/tab_collection_consumer.h
diff --git a/ios/clean/chrome/browser/ui/tab_collection/tab_collection_consumer.h b/ios/clean/chrome/browser/ui/tab_collection/tab_collection_consumer.h
index 1ca74ee3e1506288f08ec24ddcc19a0c11d521d1..c7716971e5c24a13fbf8637e9a88b037e2966b3a 100644
--- a/ios/clean/chrome/browser/ui/tab_collection/tab_collection_consumer.h
+++ b/ios/clean/chrome/browser/ui/tab_collection/tab_collection_consumer.h
@@ -10,23 +10,32 @@
// Interface to support insert/delete/updates to a tab collection.
@protocol TabCollectionConsumer
-// Inserts |item| into tab collection at |index|.
-- (void)insertItem:(TabCollectionItem*)item atIndex:(int)index;
-
-// Deletes |index| from tab collection.
-- (void)deleteItemAtIndex:(int)index;
-
-// Moves item from |fromIndex| to |toIndex|.
-- (void)moveItemFromIndex:(int)fromIndex toIndex:(int)toIndex;
+// Inserts |item| into tab collection at |index|. |SelectedIndex| is the index
+// of the selected item in the tab collection.
+- (void)insertItem:(TabCollectionItem*)item
+ atIndex:(int)index
+ selectedIndex:(int)selectedIndex;
+
+// Deletes |index| from tab collection. |SelectedIndex| is the index
+// of the selected tab in the tab collection.
+- (void)deleteItemAtIndex:(int)index selectedIndex:(int)selectedIndex;
+
+// Moves item from |fromIndex| to |toIndex|. |SelectedIndex| is the index
+// of the selected tab in the tab collection.
+- (void)moveItemFromIndex:(int)fromIndex
+ toIndex:(int)toIndex
+ selectedIndex:(int)selectedIndex;
// Replaces item at |index| with |item|.
- (void)replaceItemAtIndex:(int)index withItem:(TabCollectionItem*)item;
-// Selects the item at |index|.
-- (void)selectItemAtIndex:(int)index;
+// Selects the item at |selectedIndex|.
+- (void)setSelectedIndex:(int)selectedIndex;
-// Populates tab collection with |items|.
-- (void)populateItems:(NSArray<TabCollectionItem*>*)items;
+// Populates tab collection with |items|. |SelectedIndex| is the index
+// of the selected item in the tab collection.
+- (void)populateItems:(NSArray<TabCollectionItem*>*)items
+ selectedIndex:(int)selectedIndex;
@end
#endif // IOS_CLEAN_CHROME_BROWSER_UI_TAB_COLLECTION_TAB_COLLECTION_CONSUMER_H_

Powered by Google App Engine
This is Rietveld 408576698