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

Unified Diff: ios/showcase/suggestions/sc_suggestions_coordinator.mm

Issue 2630313004: Suggestions UI - stack item (Closed)
Patch Set: Address comments 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
« no previous file with comments | « ios/chrome/browser/ui/suggestions/suggestions_view_controller.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/showcase/suggestions/sc_suggestions_coordinator.mm
diff --git a/ios/showcase/suggestions/sc_suggestions_coordinator.mm b/ios/showcase/suggestions/sc_suggestions_coordinator.mm
index 707363d602dcf5e37b6413f983caae5e9def2b80..06c6feb1c4692016878f56078b222c4355f6d4d9 100644
--- a/ios/showcase/suggestions/sc_suggestions_coordinator.mm
+++ b/ios/showcase/suggestions/sc_suggestions_coordinator.mm
@@ -6,6 +6,7 @@
#import "ios/chrome/browser/ui/suggestions/suggestions_commands.h"
#import "ios/chrome/browser/ui/suggestions/suggestions_view_controller.h"
+#import "ios/showcase/common/protocol_alerter.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
@@ -15,6 +16,7 @@
@property(nonatomic, strong)
SuggestionsViewController* suggestionViewController;
+@property(nonatomic, strong) ProtocolAlerter* alerter;
@end
@@ -22,10 +24,15 @@
@synthesize baseViewController;
@synthesize suggestionViewController = _suggestionViewController;
+@synthesize alerter = _alerter;
#pragma mark - Coordinator
- (void)start {
+ self.alerter = [[ProtocolAlerter alloc]
+ initWithProtocols:@[ @protocol(SuggestionsCommands) ]];
+ self.alerter.baseViewController = self.baseViewController;
+
_suggestionViewController = [[SuggestionsViewController alloc]
initWithStyle:CollectionViewControllerStyleDefault];
@@ -43,4 +50,13 @@
toSection:5];
}
+- (void)openReadingList {
+ [static_cast<id<SuggestionsCommands>>(self.alerter) openReadingList];
+}
+
+- (void)openFirstPageOfReadingList {
+ [static_cast<id<SuggestionsCommands>>(self.alerter)
+ openFirstPageOfReadingList];
+}
+
@end
« no previous file with comments | « ios/chrome/browser/ui/suggestions/suggestions_view_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698