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 6775b127da0f93e592919a3ce43b1795027ca2ac..fec88c927791fbd7f0c0012658f79acf5ef8f831 100644 |
| --- a/ios/chrome/browser/ui/ntp/google_landing_controller.mm |
| +++ b/ios/chrome/browser/ui/ntp/google_landing_controller.mm |
| @@ -193,6 +193,12 @@ const CGFloat kMostVisitedPaddingIPadFavicon = 24; |
| // The number of tabs to show in the google landing fake toolbar. |
| @property(nonatomic, assign) int tabCount; |
| +// |YES| if the google landing toolbar can show the forward arrow. |
|
rohitrao (ping after 24h)
2017/04/28 10:39:59
Perhaps mention somewhere that these two values ar
justincohen
2017/04/28 13:23:04
Done.
|
| +@property(nonatomic, assign) BOOL canGoForward; |
| + |
| +// |YES| if the google landing toolbar can show the back arrow. |
| +@property(nonatomic, assign) BOOL canGoBack; |
| + |
| // iPhone landscape uses a slightly different layout for the doodle and search |
| // field frame. Returns the proper frame from |frames| based on orientation, |
| // centered in the view. |
| @@ -263,6 +269,8 @@ const CGFloat kMostVisitedPaddingIPadFavicon = 24; |
| @synthesize promoCanShow = _promoCanShow; |
| @synthesize maximumMostVisitedSitesShown = _maximumMostVisitedSitesShown; |
| @synthesize tabCount = _tabCount; |
| +@synthesize canGoForward = _canGoForward; |
| +@synthesize canGoBack = _canGoBack; |
| @synthesize voiceSearchIsEnabled = _voiceSearchIsEnabled; |
| - (void)loadView { |
| @@ -1000,6 +1008,8 @@ const CGFloat kMostVisitedPaddingIPadFavicon = 24; |
| // hidden. |
| [_headerView addToolbarWithDataSource:self.dataSource]; |
| [_headerView setToolbarTabCount:self.tabCount]; |
| + [_headerView setCanGoForward:self.canGoForward]; |
| + [_headerView setCanGoBack:self.canGoBack]; |
| } |
| [_supplementaryViews addObject:_headerView]; |
| } |
| @@ -1494,4 +1504,13 @@ const CGFloat kMostVisitedPaddingIPadFavicon = 24; |
| [_headerView setToolbarTabCount:self.tabCount]; |
| } |
| +- (void)setCanGoForward:(BOOL)canGoForward { |
| + _canGoForward = canGoForward; |
| + [_headerView setCanGoForward:self.canGoForward]; |
| +} |
| + |
| +- (void)setCanGoBack:(BOOL)canGoBack { |
| + _canGoBack = canGoBack; |
| + [_headerView setCanGoBack:self.canGoBack]; |
| +} |
| @end |