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

Side by Side Diff: ios/chrome/browser/ui/suggestions/suggestions_view_controller.mm

Issue 2618343002: Creates the Suggestions UI (Closed)
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « ios/chrome/browser/ui/suggestions/suggestions_view_controller.h ('k') | ios/showcase/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/chrome/browser/ui/suggestions/suggestions_view_controller.h"
6
7 #import "base/mac/foundation_util.h"
8 #import "ios/chrome/browser/ui/suggestions/suggestions_item.h"
9
10 #if !defined(__has_feature) || !__has_feature(objc_arc)
11 #error "This file requires ARC support."
12 #endif
13
14 @implementation SuggestionsViewController {
15 BOOL _removeMe;
16 }
17
18 @synthesize dataSourceDelegate = _dataSourceDelegate;
19 @synthesize actionsDelegate = _actionsDelegate;
20
21 #pragma mark - UIViewController
22
23 - (void)viewDidLoad {
24 [super viewDidLoad];
25
26 self.collectionView.delegate = self;
27 self.styler.cellStyle = MDCCollectionViewCellStyleCard;
28 }
29
30 #pragma mark - UICollectionViewDelegate
31
32 - (BOOL)collectionView:(UICollectionView*)collectionView
33 shouldSelectItemAtIndexPath:(NSIndexPath*)indexPath {
34 [super collectionView:(UICollectionView*)collectionView
35 shouldSelectItemAtIndexPath:(NSIndexPath*)indexPath];
36
37 return YES;
38 }
39
40 #pragma mark - MDCCollectionViewStylingDelegate
41
42 - (CGFloat)collectionView:(UICollectionView*)collectionView
43 cellHeightAtIndexPath:(NSIndexPath*)indexPath {
44 return [self.dataSourceDelegate collectionView:collectionView
45 cellHeightAtIndexPath:indexPath];
46 }
47
48 - (void)buttonPressed {
49 [self.actionsDelegate addItem];
50 }
51
52 @end
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/suggestions/suggestions_view_controller.h ('k') | ios/showcase/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698