Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(130)

Unified Diff: ios/chrome/browser/ui/tab_grid/tab_grid_view_controller.h

Issue 2588733002: Upstream Chrome on iOS source code [9/11]. (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ios/chrome/browser/ui/tab_grid/tab_grid_view_controller.h
diff --git a/ios/chrome/browser/ui/tab_grid/tab_grid_view_controller.h b/ios/chrome/browser/ui/tab_grid/tab_grid_view_controller.h
new file mode 100644
index 0000000000000000000000000000000000000000..a10433101312e26d18a2ef8ad15fb2e3c09117a6
--- /dev/null
+++ b/ios/chrome/browser/ui/tab_grid/tab_grid_view_controller.h
@@ -0,0 +1,46 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// ====== New Architecture =====
+// = This code is only used in the new iOS Chrome architecture. =
+// ============================================================================
+
+#ifndef IOS_CHROME_BROWSER_UI_TAB_GRID_TAB_GRID_VIEW_CONTROLLER_H_
+#define IOS_CHROME_BROWSER_UI_TAB_GRID_TAB_GRID_VIEW_CONTROLLER_H_
+
+#import <UIKit/UIKit.h>
+
+#import "ios/chrome/browser/ui/animators/zoom_transition_delegate.h"
+
+// The data source for tab grid UI.
+// Conceptually the tab grid represents a group of WebState objects (which
+// are ultimately the model-layer representation of a browser tab). The data
+// source must be able to map between indices and WebStates.
+@protocol TabGridDataSource<NSObject>
+
+// The number of tabs to be displayed in the grid.
+- (NSUInteger)numberOfTabsInTabGrid;
+
+// Title for the tab at |index| in the grid.
+- (NSString*)titleAtIndex:(NSInteger)index;
+
+@end
+
+@protocol TabGridActionDelegate<NSObject>
+- (void)showTabAtIndexPath:(NSIndexPath*)indexPath;
+- (void)showTabGrid;
+- (void)showSettings;
+@end
+
+// Controller for a scrolling view displaying square cells that represent
+// the user's open tabs.
+@interface TabGridViewController : UIViewController<ZoomTransitionDelegate>
+
+// Data source for the tabs to be displayed.
+@property(nonatomic, weak) id<TabGridDataSource> dataSource;
+@property(nonatomic, weak) id<TabGridActionDelegate> actionDelegate;
+
+@end
+
+#endif // IOS_CHROME_BROWSER_UI_TAB_GRID_TAB_GRID_VIEW_CONTROLLER_H_
« no previous file with comments | « ios/chrome/browser/ui/tab_grid/tab_grid_tab_cell.mm ('k') | ios/chrome/browser/ui/tab_grid/tab_grid_view_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698