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

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

Issue 2832573002: Remove WebToolbarDelegate from GoogleLandingDataSource. (Closed)
Patch Set: New comments 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 c307fa4b0243c327dbc4ad25799443aca9b9d574..70306b651c26acba4764b06dd4cf3a0f0bfe4e6b 100644
--- a/ios/chrome/browser/ui/ntp/google_landing_controller.mm
+++ b/ios/chrome/browser/ui/ntp/google_landing_controller.mm
@@ -193,6 +193,14 @@ 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, cached and
+// pushed into the header view.
+@property(nonatomic, assign) BOOL canGoForward;
+
+// |YES| if the google landing toolbar can show the back arrow, cached and
+// pushed into the header view.
+@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 +271,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 +1010,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 +1506,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
« no previous file with comments | « ios/chrome/browser/ui/ntp/google_landing_consumer.h ('k') | ios/chrome/browser/ui/ntp/google_landing_data_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698