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

Side by Side Diff: ios/showcase/tab_grid/sc_tab_grid_coordinator.mm

Issue 2741883002: [ios] Use WebStateList to back the tab grid. (Closed)
Patch Set: Add constant for invalid index Created 3 years, 9 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 unified diff | Download patch
« no previous file with comments | « ios/clean/chrome/browser/ui/tab_grid/tab_grid_view_controller.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/tab_commands.h" 8 #import "ios/clean/chrome/browser/ui/commands/tab_commands.h"
9 #import "ios/clean/chrome/browser/ui/tab_grid/tab_grid_view_controller.h" 9 #import "ios/clean/chrome/browser/ui/tab_grid/tab_grid_view_controller.h"
10 #import "ios/showcase/common/protocol_alerter.h" 10 #import "ios/showcase/common/protocol_alerter.h"
(...skipping 22 matching lines...) Expand all
33 self.viewController.dataSource = self; 33 self.viewController.dataSource = self;
34 self.viewController.tabCommandHandler = 34 self.viewController.tabCommandHandler =
35 static_cast<id<TabCommands>>(self.alerter); 35 static_cast<id<TabCommands>>(self.alerter);
36 36
37 [self.baseViewController setHidesBarsOnSwipe:YES]; 37 [self.baseViewController setHidesBarsOnSwipe:YES];
38 [self.baseViewController pushViewController:self.viewController animated:YES]; 38 [self.baseViewController pushViewController:self.viewController animated:YES];
39 } 39 }
40 40
41 #pragma mark - TabGridDataSource 41 #pragma mark - TabGridDataSource
42 42
43 - (NSUInteger)numberOfTabsInTabGrid { 43 - (int)numberOfTabsInTabGrid {
44 return 3; 44 return 3;
45 } 45 }
46 46
47 - (NSString*)titleAtIndex:(NSInteger)index { 47 - (NSString*)titleAtIndex:(int)index {
48 return [NSString stringWithFormat:@"Tab %" PRIdNS, index]; 48 return [NSString stringWithFormat:@"Tab %d", index];
49 } 49 }
50 50
51 - (NSInteger)indexOfActiveTab { 51 - (int)indexOfActiveTab {
52 return NSNotFound; 52 return kTabGridDataSourceInvalidIndex;
53 } 53 }
54 54
55 @end 55 @end
OLDNEW
« no previous file with comments | « ios/clean/chrome/browser/ui/tab_grid/tab_grid_view_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698