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

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

Issue 2638413006: Add ContentSuggestionsMediator (Closed)
Patch Set: Format Created 3 years, 10 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
« no previous file with comments | « ios/chrome/browser/ui/content_suggestions/content_suggestions_view_controller.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "ios/showcase/suggestions/sc_suggestions_coordinator.h" 5 #import "ios/showcase/suggestions/sc_suggestions_coordinator.h"
6 6
7 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_commands. h" 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" 8 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_view_cont roller.h"
9 #import "ios/showcase/common/protocol_alerter.h" 9 #import "ios/showcase/common/protocol_alerter.h"
10 10
(...skipping 16 matching lines...) Expand all
27 @synthesize alerter = _alerter; 27 @synthesize alerter = _alerter;
28 28
29 #pragma mark - Coordinator 29 #pragma mark - Coordinator
30 30
31 - (void)start { 31 - (void)start {
32 self.alerter = [[ProtocolAlerter alloc] 32 self.alerter = [[ProtocolAlerter alloc]
33 initWithProtocols:@[ @protocol(ContentSuggestionsCommands) ]]; 33 initWithProtocols:@[ @protocol(ContentSuggestionsCommands) ]];
34 self.alerter.baseViewController = self.baseViewController; 34 self.alerter.baseViewController = self.baseViewController;
35 35
36 _suggestionViewController = [[ContentSuggestionsViewController alloc] 36 _suggestionViewController = [[ContentSuggestionsViewController alloc]
37 initWithStyle:CollectionViewControllerStyleDefault]; 37 initWithStyle:CollectionViewControllerStyleDefault
38 dataSource:nil];
38 39
39 _suggestionViewController.suggestionCommandHandler = 40 _suggestionViewController.suggestionCommandHandler =
40 reinterpret_cast<id<ContentSuggestionsCommands>>(self.alerter); 41 reinterpret_cast<id<ContentSuggestionsCommands>>(self.alerter);
41 42
42 [self.baseViewController pushViewController:_suggestionViewController 43 [self.baseViewController pushViewController:_suggestionViewController
43 animated:YES]; 44 animated:YES];
44 } 45 }
45 46
46 @end 47 @end
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/content_suggestions/content_suggestions_view_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698