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

Unified Diff: ios/chrome/browser/ui/ntp/google_landing_controller.mm

Issue 2833513002: Replace TabModel with WebStateList in GoogleLandingController. (Closed)
Patch Set: Created 3 years, 8 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
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

Powered by Google App Engine
This is Rietveld 408576698