OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 // ====== New Architecture ===== | 5 // ====== New Architecture ===== |
6 // = This code is only used in the new iOS Chrome architecture. = | 6 // = This code is only used in the new iOS Chrome architecture. = |
7 // ============================================================================ | 7 // ============================================================================ |
8 | 8 |
9 #ifndef IOS_CLEAN_CHROME_BROWSER_UI_TAB_GRID_TAB_GRID_VIEW_CONTROLLER_H_ | 9 #ifndef IOS_CLEAN_CHROME_BROWSER_UI_TAB_GRID_TAB_GRID_VIEW_CONTROLLER_H_ |
10 #define IOS_CLEAN_CHROME_BROWSER_UI_TAB_GRID_TAB_GRID_VIEW_CONTROLLER_H_ | 10 #define IOS_CLEAN_CHROME_BROWSER_UI_TAB_GRID_TAB_GRID_VIEW_CONTROLLER_H_ |
(...skipping 11 matching lines...) Expand all Loading... |
22 // are ultimately the model-layer representation of a browser tab). The data | 22 // are ultimately the model-layer representation of a browser tab). The data |
23 // source must be able to map between indices and WebStates. | 23 // source must be able to map between indices and WebStates. |
24 @protocol TabGridDataSource<NSObject> | 24 @protocol TabGridDataSource<NSObject> |
25 | 25 |
26 // The number of tabs to be displayed in the grid. | 26 // The number of tabs to be displayed in the grid. |
27 - (NSUInteger)numberOfTabsInTabGrid; | 27 - (NSUInteger)numberOfTabsInTabGrid; |
28 | 28 |
29 // Title for the tab at |index| in the grid. | 29 // Title for the tab at |index| in the grid. |
30 - (NSString*)titleAtIndex:(NSInteger)index; | 30 - (NSString*)titleAtIndex:(NSInteger)index; |
31 | 31 |
| 32 // Index for the active tab. |
| 33 - (NSInteger)indexOfActiveTab; |
| 34 |
32 @end | 35 @end |
33 | 36 |
34 // Controller for a scrolling view displaying square cells that represent | 37 // Controller for a scrolling view displaying square cells that represent |
35 // the user's open tabs. | 38 // the user's open tabs. |
36 @interface TabGridViewController : UIViewController<ZoomTransitionDelegate> | 39 @interface TabGridViewController : UIViewController<ZoomTransitionDelegate> |
37 | 40 |
38 // Data source for the tabs to be displayed. | 41 // Data source for the tabs to be displayed. |
39 @property(nonatomic, weak) id<TabGridDataSource> dataSource; | 42 @property(nonatomic, weak) id<TabGridDataSource> dataSource; |
40 // Command handlers. | 43 // Command handlers. |
41 @property(nonatomic, weak) id<SettingsCommands> settingsCommandHandler; | 44 @property(nonatomic, weak) id<SettingsCommands> settingsCommandHandler; |
42 @property(nonatomic, weak) id<TabCommands> tabCommandHandler; | 45 @property(nonatomic, weak) id<TabCommands> tabCommandHandler; |
43 @property(nonatomic, weak) id<TabGridCommands> tabGridCommandHandler; | 46 @property(nonatomic, weak) id<TabGridCommands> tabGridCommandHandler; |
44 @end | 47 @end |
45 | 48 |
46 #endif // IOS_CLEAN_CHROME_BROWSER_UI_TAB_GRID_TAB_GRID_VIEW_CONTROLLER_H_ | 49 #endif // IOS_CLEAN_CHROME_BROWSER_UI_TAB_GRID_TAB_GRID_VIEW_CONTROLLER_H_ |
OLD | NEW |