OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef IOS_CLEAN_CHROME_BROWSER_UI_TAB_COLLECTION_TAB_COLLECTION_DATA_SOURCE_H_ | |
6 #define IOS_CLEAN_CHROME_BROWSER_UI_TAB_COLLECTION_TAB_COLLECTION_DATA_SOURCE_H_ | |
7 | |
8 #import <Foundation/Foundation.h> | |
9 | |
10 const int kTabCollectionDataSourceInvalidIndex = -1; | |
11 | |
12 // The data source for tab collection UI. | |
13 // Conceptually the tab collection represents a group of WebState objects (which | |
14 // are ultimately the model-layer representation of a browser tab). The data | |
15 // source must be able to map between indices and WebStates. | |
16 @protocol TabCollectionDataSource<NSObject> | |
17 | |
18 // The number of tabs to be displayed in the collection. | |
19 - (int)numberOfTabs; | |
20 | |
21 // Title for the tab at |index| in the collection. | |
22 - (NSString*)titleAtIndex:(int)index; | |
23 | |
24 // Index for the active tab or kTabCollectionDataSourceInvalidIndex if there is | |
25 // no active tab. | |
26 - (int)indexOfActiveTab; | |
27 | |
28 @end | |
29 | |
30 #endif // IOS_CLEAN_CHROME_BROWSER_UI_TAB_COLLECTION_TAB_COLLECTION_DATA_SOURCE
_H_ | |
OLD | NEW |