| 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
|
|
|