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

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

Issue 2829003002: Add CommandDispatcher to BrowserViewController. (Closed)
Patch Set: rohit 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/new_tab_page_header_view.mm
diff --git a/ios/chrome/browser/ui/ntp/new_tab_page_header_view.mm b/ios/chrome/browser/ui/ntp/new_tab_page_header_view.mm
index 4fe3ce9e6aab743900f5ac14e40296b8f2a876ad..805d5a17fec3f18fb38c2a3c235272067b701c15 100644
--- a/ios/chrome/browser/ui/ntp/new_tab_page_header_view.mm
+++ b/ios/chrome/browser/ui/ntp/new_tab_page_header_view.mm
@@ -64,12 +64,13 @@ const CGFloat kMaxConstraintConstantDiff = 5;
[self addSubview:[_toolbarController view]];
}
-- (void)addToolbarWithDataSource:(id<GoogleLandingDataSource>)dataSource {
+- (void)addToolbarWithDataSource:(id<GoogleLandingDataSource>)dataSource
+ dispatcher:(id)dispatcher {
DCHECK(!_toolbarController);
DCHECK(dataSource);
- _toolbarController.reset([[NewTabPageToolbarController alloc]
- initWithToolbarDataSource:dataSource]);
+ _toolbarController.reset([[NewTabPageToolbarController alloc] init]);
+ [_toolbarController setDispatcher:dispatcher];
_toolbarController.get().readingListModel = [dataSource readingListModel];
UIView* toolbarView = [_toolbarController view];
« no previous file with comments | « ios/chrome/browser/ui/ntp/new_tab_page_header_view.h ('k') | ios/chrome/browser/ui/ntp/new_tab_page_toolbar_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698