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

Unified Diff: ios/showcase/content_suggestions/sc_content_suggestions_coordinator.mm

Issue 2769063005: Add CSDataSource in showcase (Closed)
Patch Set: Address comments Created 3 years, 7 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/showcase/content_suggestions/sc_content_suggestions_coordinator.mm
diff --git a/ios/showcase/content_suggestions/sc_content_suggestions_coordinator.mm b/ios/showcase/content_suggestions/sc_content_suggestions_coordinator.mm
index c4109ceb2ed559b514c180e5a1d8a0afdebf89e7..4e24a813a4712f0f05f8b13f324bad26b15f3347 100644
--- a/ios/showcase/content_suggestions/sc_content_suggestions_coordinator.mm
+++ b/ios/showcase/content_suggestions/sc_content_suggestions_coordinator.mm
@@ -7,6 +7,7 @@
#import "ios/chrome/browser/ui/content_suggestions/content_suggestions_commands.h"
#import "ios/chrome/browser/ui/content_suggestions/content_suggestions_view_controller.h"
#import "ios/showcase/common/protocol_alerter.h"
+#import "ios/showcase/content_suggestions/sc_content_suggestions_data_source.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
@@ -17,6 +18,7 @@
@property(nonatomic, strong)
ContentSuggestionsViewController* suggestionViewController;
@property(nonatomic, strong) ProtocolAlerter* alerter;
+@property(nonatomic, strong) SCContentSuggestionsDataSource* dataSource;
@end
@@ -25,6 +27,7 @@
@synthesize baseViewController;
@synthesize suggestionViewController = _suggestionViewController;
@synthesize alerter = _alerter;
+@synthesize dataSource = _dataSource;
#pragma mark - Coordinator
@@ -33,9 +36,11 @@
initWithProtocols:@[ @protocol(ContentSuggestionsCommands) ]];
self.alerter.baseViewController = self.baseViewController;
+ _dataSource = [[SCContentSuggestionsDataSource alloc] init];
+
_suggestionViewController = [[ContentSuggestionsViewController alloc]
initWithStyle:CollectionViewControllerStyleDefault
- dataSource:nil];
+ dataSource:_dataSource];
_suggestionViewController.suggestionCommandHandler =
reinterpret_cast<id<ContentSuggestionsCommands>>(self.alerter);
« no previous file with comments | « ios/showcase/content_suggestions/BUILD.gn ('k') | ios/showcase/content_suggestions/sc_content_suggestions_data_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698