| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 // ====== New Architecture ===== | |
| 6 // = This code is only used in the new iOS Chrome architecture. = | |
| 7 // ============================================================================ | |
| 8 | |
| 9 #ifndef IOS_CHROME_BROWSER_UI_TAB_GRID_TAB_GRID_VIEW_CONTROLLER_H_ | |
| 10 #define IOS_CHROME_BROWSER_UI_TAB_GRID_TAB_GRID_VIEW_CONTROLLER_H_ | |
| 11 | |
| 12 #import <UIKit/UIKit.h> | |
| 13 | |
| 14 #import "ios/chrome/browser/ui/animators/zoom_transition_delegate.h" | |
| 15 | |
| 16 @protocol SettingsCommands; | |
| 17 @protocol TabCommands; | |
| 18 @protocol TabGridCommands; | |
| 19 | |
| 20 // The data source for tab grid UI. | |
| 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 | |
| 23 // source must be able to map between indices and WebStates. | |
| 24 @protocol TabGridDataSource<NSObject> | |
| 25 | |
| 26 // The number of tabs to be displayed in the grid. | |
| 27 - (NSUInteger)numberOfTabsInTabGrid; | |
| 28 | |
| 29 // Title for the tab at |index| in the grid. | |
| 30 - (NSString*)titleAtIndex:(NSInteger)index; | |
| 31 | |
| 32 @end | |
| 33 | |
| 34 // Controller for a scrolling view displaying square cells that represent | |
| 35 // the user's open tabs. | |
| 36 @interface TabGridViewController : UIViewController<ZoomTransitionDelegate> | |
| 37 | |
| 38 // Data source for the tabs to be displayed. | |
| 39 @property(nonatomic, weak) id<TabGridDataSource> dataSource; | |
| 40 // Command handlers. | |
| 41 @property(nonatomic, weak) id<SettingsCommands> settingsCommandHandler; | |
| 42 @property(nonatomic, weak) id<TabCommands> tabCommandHandler; | |
| 43 @property(nonatomic, weak) id<TabGridCommands> tabGridCommandHandler; | |
| 44 @end | |
| 45 | |
| 46 #endif // IOS_CHROME_BROWSER_UI_TAB_GRID_TAB_GRID_VIEW_CONTROLLER_H_ | |
| OLD | NEW |