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 // The data source for tab grid UI. |
| 17 // Conceptually the tab grid represents a group of WebState objects (which |
| 18 // are ultimately the model-layer representation of a browser tab). The data |
| 19 // source must be able to map between indices and WebStates. |
| 20 @protocol TabGridDataSource<NSObject> |
| 21 |
| 22 // The number of tabs to be displayed in the grid. |
| 23 - (NSUInteger)numberOfTabsInTabGrid; |
| 24 |
| 25 // Title for the tab at |index| in the grid. |
| 26 - (NSString*)titleAtIndex:(NSInteger)index; |
| 27 |
| 28 @end |
| 29 |
| 30 @protocol TabGridActionDelegate<NSObject> |
| 31 - (void)showTabAtIndexPath:(NSIndexPath*)indexPath; |
| 32 - (void)showTabGrid; |
| 33 - (void)showSettings; |
| 34 @end |
| 35 |
| 36 // Controller for a scrolling view displaying square cells that represent |
| 37 // the user's open tabs. |
| 38 @interface TabGridViewController : UIViewController<ZoomTransitionDelegate> |
| 39 |
| 40 // Data source for the tabs to be displayed. |
| 41 @property(nonatomic, weak) id<TabGridDataSource> dataSource; |
| 42 @property(nonatomic, weak) id<TabGridActionDelegate> actionDelegate; |
| 43 |
| 44 @end |
| 45 |
| 46 #endif // IOS_CHROME_BROWSER_UI_TAB_GRID_TAB_GRID_VIEW_CONTROLLER_H_ |
OLD | NEW |