| 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 #import "ios/showcase/tab_grid/sc_tab_grid_coordinator.h" | 5 #import "ios/showcase/tab_grid/sc_tab_grid_coordinator.h" |
| 6 | 6 |
| 7 #import "base/format_macros.h" | 7 #import "base/format_macros.h" |
| 8 #import "ios/clean/chrome/browser/ui/commands/settings_commands.h" | 8 #import "ios/clean/chrome/browser/ui/commands/settings_commands.h" |
| 9 #import "ios/clean/chrome/browser/ui/commands/tab_grid_commands.h" | 9 #import "ios/clean/chrome/browser/ui/commands/tab_grid_commands.h" |
| 10 #import "ios/clean/chrome/browser/ui/commands/tools_menu_commands.h" | 10 #import "ios/clean/chrome/browser/ui/commands/tools_menu_commands.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 self.alerter.baseViewController = self.baseViewController; | 35 self.alerter.baseViewController = self.baseViewController; |
| 36 | 36 |
| 37 self.viewController = [[TabGridViewController alloc] init]; | 37 self.viewController = [[TabGridViewController alloc] init]; |
| 38 self.viewController.title = @"Tab Grid"; | 38 self.viewController.title = @"Tab Grid"; |
| 39 self.viewController.dispatcher = | 39 self.viewController.dispatcher = |
| 40 static_cast<id<SettingsCommands, TabGridCommands, ToolsMenuCommands>>( | 40 static_cast<id<SettingsCommands, TabGridCommands, ToolsMenuCommands>>( |
| 41 self.alerter); | 41 self.alerter); |
| 42 | 42 |
| 43 TabCollectionItem* item0 = [[TabCollectionItem alloc] init]; | 43 TabCollectionItem* item0 = [[TabCollectionItem alloc] init]; |
| 44 item0.title = @"Tab 0"; | 44 item0.title = @"Tab 0"; |
| 45 [self.viewController populateItems:@[ item0 ]]; | 45 [self.viewController populateItems:@[ item0 ] selectedIndex:0]; |
| 46 | 46 |
| 47 [self.baseViewController setHidesBarsOnSwipe:YES]; | 47 [self.baseViewController setHidesBarsOnSwipe:YES]; |
| 48 [self.baseViewController pushViewController:self.viewController animated:YES]; | 48 [self.baseViewController pushViewController:self.viewController animated:YES]; |
| 49 } | 49 } |
| 50 | 50 |
| 51 @end | 51 @end |
| OLD | NEW |