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 | |
35 @end | 32 @end |
36 | 33 |
37 // Controller for a scrolling view displaying square cells that represent | 34 // Controller for a scrolling view displaying square cells that represent |
38 // the user's open tabs. | 35 // the user's open tabs. |
39 @interface TabGridViewController : UIViewController<ZoomTransitionDelegate> | 36 @interface TabGridViewController : UIViewController<ZoomTransitionDelegate> |
40 | 37 |
41 // Data source for the tabs to be displayed. | 38 // Data source for the tabs to be displayed. |
42 @property(nonatomic, weak) id<TabGridDataSource> dataSource; | 39 @property(nonatomic, weak) id<TabGridDataSource> dataSource; |
43 // Command handlers. | 40 // Command handlers. |
44 @property(nonatomic, weak) id<SettingsCommands> settingsCommandHandler; | 41 @property(nonatomic, weak) id<SettingsCommands> settingsCommandHandler; |
45 @property(nonatomic, weak) id<TabCommands> tabCommandHandler; | 42 @property(nonatomic, weak) id<TabCommands> tabCommandHandler; |
46 @property(nonatomic, weak) id<TabGridCommands> tabGridCommandHandler; | 43 @property(nonatomic, weak) id<TabGridCommands> tabGridCommandHandler; |
47 @end | 44 @end |
48 | 45 |
49 #endif // IOS_CLEAN_CHROME_BROWSER_UI_TAB_GRID_TAB_GRID_VIEW_CONTROLLER_H_ | 46 #endif // IOS_CLEAN_CHROME_BROWSER_UI_TAB_GRID_TAB_GRID_VIEW_CONTROLLER_H_ |
OLD | NEW |