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

Unified Diff: ios/chrome/browser/ui/content_suggestions/content_suggestions_view_controller.mm

Issue 2638413006: Add ContentSuggestionsMediator (Closed)
Patch Set: Format Created 3 years, 11 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/content_suggestions/content_suggestions_view_controller.mm
diff --git a/ios/chrome/browser/ui/content_suggestions/content_suggestions_view_controller.mm b/ios/chrome/browser/ui/content_suggestions/content_suggestions_view_controller.mm
index 3b82cd532b9968b9f74190d86c3122fe46511590..f7d74408bbc2f834c1036afc3fc3910c25304cfb 100644
--- a/ios/chrome/browser/ui/content_suggestions/content_suggestions_view_controller.mm
+++ b/ios/chrome/browser/ui/content_suggestions/content_suggestions_view_controller.mm
@@ -40,12 +40,21 @@ const NSTimeInterval kAnimationDuration = 0.35;
@synthesize suggestionCommandHandler = _suggestionCommandHandler;
@synthesize collectionUpdater = _collectionUpdater;
+- (instancetype)initWithStyle:(CollectionViewControllerStyle)style
+ dataSource:(id<ContentSuggestionsDataSource>)dataSource {
+ self = [super initWithStyle:style];
+ if (self) {
+ _collectionUpdater = [[ContentSuggestionsCollectionUpdater alloc]
+ initWithDataSource:dataSource];
+ }
+ return self;
+}
+
#pragma mark - UIViewController
- (void)viewDidLoad {
[super viewDidLoad];
- _collectionUpdater = [[ContentSuggestionsCollectionUpdater alloc] init];
_collectionUpdater.collectionViewController = self;
self.collectionView.delegate = self;

Powered by Google App Engine
This is Rietveld 408576698