Chromium Code Reviews| 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 @class TabCollectionItem; | 8 @class TabCollectionItem; |
| 9 | 9 |
| 10 // Interface to support insert/delete/updates to a tab collection. | 10 // Interface to support insert/delete/updates to a tab collection. |
| 11 @protocol TabCollectionConsumer | 11 @protocol TabCollectionConsumer |
| 12 | 12 |
| 13 // Inserts |item| into tab collection at |index|. | 13 // Inserts |item| into tab collection at |index|. |
|
marq (ping after 24h)
2017/05/30 11:09:43
Here and below: document what |selectedIndex| mean
edchin
2017/06/01 23:52:28
Done.
| |
| 14 - (void)insertItem:(TabCollectionItem*)item atIndex:(int)index; | 14 - (void)insertItem:(TabCollectionItem*)item |
| 15 atIndex:(int)index | |
| 16 selectedIndex:(int)selectedIndex; | |
| 15 | 17 |
| 16 // Deletes |index| from tab collection. | 18 // Deletes |index| from tab collection. |
| 17 - (void)deleteItemAtIndex:(int)index; | 19 - (void)deleteItemAtIndex:(int)index selectedIndex:(int)selectedIndex; |
| 18 | 20 |
| 19 // Moves item from |fromIndex| to |toIndex|. | 21 // Moves item from |fromIndex| to |toIndex|. |
| 20 - (void)moveItemFromIndex:(int)fromIndex toIndex:(int)toIndex; | 22 - (void)moveItemFromIndex:(int)fromIndex |
| 23 toIndex:(int)toIndex | |
| 24 selectedIndex:(int)selectedIndex; | |
| 21 | 25 |
| 22 // Replaces item at |index| with |item|. | 26 // Replaces item at |index| with |item|. |
| 23 - (void)replaceItemAtIndex:(int)index withItem:(TabCollectionItem*)item; | 27 - (void)replaceItemAtIndex:(int)index withItem:(TabCollectionItem*)item; |
|
marq (ping after 24h)
2017/05/30 11:09:43
Does this also need a |selectedIndex| parameter?
edchin
2017/06/01 23:52:28
The selection does not change with a replace.
| |
| 24 | 28 |
| 25 // Selects the item at |index|. | 29 // Selects the item at |index|. |
| 26 - (void)selectItemAtIndex:(int)index; | 30 - (void)selectItemAtIndex:(int)index; |
| 27 | 31 |
| 28 // Populates tab collection with |items|. | 32 // Populates tab collection with |items|. |
| 29 - (void)populateItems:(NSArray<TabCollectionItem*>*)items; | 33 - (void)populateItems:(NSArray<TabCollectionItem*>*)items |
| 34 selectedIndex:(int)selectedIndex; | |
| 30 @end | 35 @end |
| 31 | 36 |
| 32 #endif // IOS_CLEAN_CHROME_BROWSER_UI_TAB_COLLECTION_TAB_COLLECTION_CONSUMER_H_ | 37 #endif // IOS_CLEAN_CHROME_BROWSER_UI_TAB_COLLECTION_TAB_COLLECTION_CONSUMER_H_ |
| OLD | NEW |