OLD | NEW |
---|---|
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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_CLEAN_CHROME_BROWSER_UI_TAB_COLLECTION_TAB_COLLECTION_CONSUMER_H_ | 5 #ifndef IOS_CLEAN_CHROME_BROWSER_UI_TAB_COLLECTION_TAB_COLLECTION_CONSUMER_H_ |
6 #define IOS_CLEAN_CHROME_BROWSER_UI_TAB_COLLECTION_TAB_COLLECTION_CONSUMER_H_ | 6 #define IOS_CLEAN_CHROME_BROWSER_UI_TAB_COLLECTION_TAB_COLLECTION_CONSUMER_H_ |
7 | 7 |
8 #import "ios/clean/chrome/browser/ui/tab_collection/tab_collection_item.h" | |
sczs
2017/05/18 16:11:01
Can we forward declare it?
edchin
2017/05/18 17:30:26
Done.
| |
9 | |
8 // Interface to support insert/delete/updates to a tab collection. | 10 // Interface to support insert/delete/updates to a tab collection. |
9 @protocol TabCollectionConsumer | 11 @protocol TabCollectionConsumer |
10 | 12 |
11 // Inserts item into tab collection at |index|. | 13 // Inserts |item| into tab collection at |index|. |
12 - (void)insertItemAtIndex:(int)index; | 14 - (void)insertItem:(TabCollectionItem*)item atIndex:(int)index; |
13 | 15 |
14 // Deletes |index| from tab collection. | 16 // Deletes |index| from tab collection. |
15 - (void)deleteItemAtIndex:(int)index; | 17 - (void)deleteItemAtIndex:(int)index; |
16 | 18 |
17 // Reloads |indexes| in tab collection. | 19 // Moves item from |fromIndex| to |toIndex|. |
18 - (void)reloadItemsAtIndexes:(NSIndexSet*)indexes; | 20 - (void)moveItemFromIndex:(int)fromIndex toIndex:(int)toIndex; |
19 | 21 |
22 // Replaces item at |index| with |item|. | |
23 - (void)replaceItemAtIndex:(int)index withItem:(TabCollectionItem*)item; | |
24 | |
25 // Selects the item at |index|. | |
26 - (void)selectItemAtIndex:(int)index; | |
27 | |
28 // Initializes tab collection with |items|. | |
sczs
2017/05/18 16:11:01
initialize sounds like this would return a TabColl
edchin
2017/05/18 17:30:26
Done.
| |
29 - (void)initializeItems:(NSArray<TabCollectionItem*>*)items; | |
20 @end | 30 @end |
21 | 31 |
22 #endif // IOS_CLEAN_CHROME_BROWSER_UI_TAB_COLLECTION_TAB_COLLECTION_CONSUMER_H_ | 32 #endif // IOS_CLEAN_CHROME_BROWSER_UI_TAB_COLLECTION_TAB_COLLECTION_CONSUMER_H_ |
OLD | NEW |