OLD | NEW |
(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 |
OLD | NEW |