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

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

Issue 2829003002: Add CommandDispatcher to BrowserViewController. (Closed)
Patch Set: Cleaner 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 ff3ee1eb3362f66b1ef0a0ae2a9773ae6d073590..49285daceecbba9065d37465d78f90b2ed05fe32 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,14 @@ 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] initWithToolbar]);
+ [_toolbarController setDispatcher:dispatcher];
_toolbarController.get().readingListModel = [dataSource readingListModel];
UIView* toolbarView = [_toolbarController view];

Powered by Google App Engine
This is Rietveld 408576698