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

Unified Diff: ios/showcase/tab_grid/sc_tab_grid_coordinator.mm

Issue 2885983003: [ios] TabCollectionItem (Closed)
Patch Set: Address comments Created 3 years, 7 months 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
« no previous file with comments | « ios/clean/chrome/browser/ui/tab_strip/tab_strip_coordinator.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/showcase/tab_grid/sc_tab_grid_coordinator.mm
diff --git a/ios/showcase/tab_grid/sc_tab_grid_coordinator.mm b/ios/showcase/tab_grid/sc_tab_grid_coordinator.mm
index a8afdfbcff81a3e92be92fee5fbbdd449476684d..846f101c874024995e034331d5f7a6c793e056e1 100644
--- a/ios/showcase/tab_grid/sc_tab_grid_coordinator.mm
+++ b/ios/showcase/tab_grid/sc_tab_grid_coordinator.mm
@@ -8,7 +8,8 @@
#import "ios/clean/chrome/browser/ui/commands/settings_commands.h"
#import "ios/clean/chrome/browser/ui/commands/tab_grid_commands.h"
#import "ios/clean/chrome/browser/ui/commands/tools_menu_commands.h"
-#import "ios/clean/chrome/browser/ui/tab_collection/tab_collection_data_source.h"
+#import "ios/clean/chrome/browser/ui/tab_collection/tab_collection_consumer.h"
+#import "ios/clean/chrome/browser/ui/tab_collection/tab_collection_item.h"
#import "ios/clean/chrome/browser/ui/tab_grid/tab_grid_view_controller.h"
#import "ios/showcase/common/protocol_alerter.h"
@@ -16,7 +17,7 @@
#error "This file requires ARC support."
#endif
-@interface SCTabGridCoordinator ()<TabCollectionDataSource>
+@interface SCTabGridCoordinator ()
@property(nonatomic, strong) TabGridViewController* viewController;
@property(nonatomic, strong) ProtocolAlerter* alerter;
@end
@@ -35,27 +36,16 @@
self.viewController = [[TabGridViewController alloc] init];
self.viewController.title = @"Tab Grid";
- self.viewController.dataSource = self;
self.viewController.dispatcher =
static_cast<id<SettingsCommands, TabGridCommands, ToolsMenuCommands>>(
self.alerter);
+ TabCollectionItem* item0 = [[TabCollectionItem alloc] init];
+ item0.title = @"Tab 0";
+ [self.viewController populateItems:@[ item0 ]];
+
[self.baseViewController setHidesBarsOnSwipe:YES];
[self.baseViewController pushViewController:self.viewController animated:YES];
}
-#pragma mark - TabCollectionDataSource
-
-- (int)numberOfTabs {
- return 3;
-}
-
-- (NSString*)titleAtIndex:(int)index {
- return [NSString stringWithFormat:@"Tab %d", index];
-}
-
-- (int)indexOfActiveTab {
- return kTabCollectionDataSourceInvalidIndex;
-}
-
@end
« no previous file with comments | « ios/clean/chrome/browser/ui/tab_strip/tab_strip_coordinator.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698