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

Side by Side Diff: ios/showcase/suggestions/sc_suggestions_coordinator.mm

Issue 2766313003: Rename Suggestions to ContentSuggestions in Showcase (Closed)
Patch Set: Rebase Created 3 years, 9 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #import "ios/showcase/suggestions/sc_suggestions_coordinator.h"
6
7 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_commands. h"
8 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_view_cont roller.h"
9 #import "ios/showcase/common/protocol_alerter.h"
10
11 #if !defined(__has_feature) || !__has_feature(objc_arc)
12 #error "This file requires ARC support."
13 #endif
14
15 @interface SCSuggestionsCoordinator ()
16
17 @property(nonatomic, strong)
18 ContentSuggestionsViewController* suggestionViewController;
19 @property(nonatomic, strong) ProtocolAlerter* alerter;
20
21 @end
22
23 @implementation SCSuggestionsCoordinator
24
25 @synthesize baseViewController;
26 @synthesize suggestionViewController = _suggestionViewController;
27 @synthesize alerter = _alerter;
28
29 #pragma mark - Coordinator
30
31 - (void)start {
32 self.alerter = [[ProtocolAlerter alloc]
33 initWithProtocols:@[ @protocol(ContentSuggestionsCommands) ]];
34 self.alerter.baseViewController = self.baseViewController;
35
36 _suggestionViewController = [[ContentSuggestionsViewController alloc]
37 initWithStyle:CollectionViewControllerStyleDefault
38 dataSource:nil];
39
40 _suggestionViewController.suggestionCommandHandler =
41 reinterpret_cast<id<ContentSuggestionsCommands>>(self.alerter);
42
43 [self.baseViewController pushViewController:_suggestionViewController
44 animated:YES];
45 }
46
47 @end
OLDNEW
« no previous file with comments | « ios/showcase/suggestions/sc_suggestions_coordinator.h ('k') | ios/showcase/suggestions/sc_suggestions_egtest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698