| 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_ |
| 11 | 11 |
| 12 #import <UIKit/UIKit.h> | 12 #import <UIKit/UIKit.h> |
| 13 | 13 |
| 14 #import "ios/clean/chrome/browser/ui/animators/zoom_transition_delegate.h" | 14 #import "ios/clean/chrome/browser/ui/animators/zoom_transition_delegate.h" |
| 15 | 15 |
| 16 @protocol SettingsCommands; | 16 @protocol SettingsCommands; |
| 17 @protocol TabCommands; | 17 @protocol TabCommands; |
| 18 @protocol TabGridCommands; | 18 @protocol TabGridCommands; |
| 19 | 19 |
| 20 // The data source for tab grid UI. | 20 // The data source for tab grid UI. |
| 21 // Conceptually the tab grid represents a group of WebState objects (which | 21 // Conceptually the tab grid represents a group of WebState objects (which |
| 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 - (int)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:(int)index; |
| 31 | 31 |
| 32 // Index for the active tab. | 32 // Index for the active tab. |
| 33 - (NSInteger)indexOfActiveTab; | 33 - (int)indexOfActiveTab; |
| 34 | 34 |
| 35 @end | 35 @end |
| 36 | 36 |
| 37 // Controller for a scrolling view displaying square cells that represent | 37 // Controller for a scrolling view displaying square cells that represent |
| 38 // the user's open tabs. | 38 // the user's open tabs. |
| 39 @interface TabGridViewController : UIViewController<ZoomTransitionDelegate> | 39 @interface TabGridViewController : UIViewController<ZoomTransitionDelegate> |
| 40 | 40 |
| 41 // Data source for the tabs to be displayed. | 41 // Data source for the tabs to be displayed. |
| 42 @property(nonatomic, weak) id<TabGridDataSource> dataSource; | 42 @property(nonatomic, weak) id<TabGridDataSource> dataSource; |
| 43 // Command handlers. | 43 // Command handlers. |
| 44 @property(nonatomic, weak) id<SettingsCommands> settingsCommandHandler; | 44 @property(nonatomic, weak) id<SettingsCommands> settingsCommandHandler; |
| 45 @property(nonatomic, weak) id<TabCommands> tabCommandHandler; | 45 @property(nonatomic, weak) id<TabCommands> tabCommandHandler; |
| 46 @property(nonatomic, weak) id<TabGridCommands> tabGridCommandHandler; | 46 @property(nonatomic, weak) id<TabGridCommands> tabGridCommandHandler; |
| 47 @end | 47 @end |
| 48 | 48 |
| 49 #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 |