Chromium Code Reviews| Index: ios/chrome/browser/ui/ntp/google_landing_controller.mm |
| diff --git a/ios/chrome/browser/ui/ntp/google_landing_controller.mm b/ios/chrome/browser/ui/ntp/google_landing_controller.mm |
| index 19463eca637ab97ddf7a0d8164c26114892e123b..d4859011d11bea048b9295457462a537030e9238 100644 |
| --- a/ios/chrome/browser/ui/ntp/google_landing_controller.mm |
| +++ b/ios/chrome/browser/ui/ntp/google_landing_controller.mm |
| @@ -231,6 +231,7 @@ const CGFloat kMostVisitedPaddingIPadFavicon = 24; |
| @synthesize delegate = _delegate; |
| @synthesize showLogo = _showLogo; |
| @synthesize offTheRecord = _offTheRecord; |
| +@synthesize tabCount = _tabCount; |
| @synthesize voiceSearchEnabled = _voiceSearchEnabled; |
| - (void)loadView { |
| @@ -967,6 +968,7 @@ const CGFloat kMostVisitedPaddingIPadFavicon = 24; |
| // iPhone header also contains a toolbar since the normal toolbar is |
| // hidden. |
| [_headerView addToolbarWithDataSource:self.dataSource]; |
| + [_headerView setToolbarTabCount:self.tabCount]; |
| } |
| [_supplementaryViews addObject:_headerView]; |
| } |
| @@ -1456,4 +1458,9 @@ const CGFloat kMostVisitedPaddingIPadFavicon = 24; |
| [_mostVisitedView reloadItemsAtIndexPaths:@[ indexPath ]]; |
| } |
| +- (void)setTabCount:(int)tabCount { |
| + _tabCount = tabCount; |
|
rohitrao (ping after 24h)
2017/04/19 19:26:33
Why do we need to cache this in an ivar? Does hea
justincohen
2017/04/19 21:12:23
headerView is created later.
|
| + [_headerView setToolbarTabCount:self.tabCount]; |
| +} |
| + |
| @end |