| Index: ios/chrome/browser/ui/suggestions/suggestions_view_controller.mm
|
| diff --git a/ios/chrome/browser/ui/suggestions/suggestions_view_controller.mm b/ios/chrome/browser/ui/suggestions/suggestions_view_controller.mm
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..d5083882e16463747e6605f56898db34324fecf6
|
| --- /dev/null
|
| +++ b/ios/chrome/browser/ui/suggestions/suggestions_view_controller.mm
|
| @@ -0,0 +1,52 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#import "ios/chrome/browser/ui/suggestions/suggestions_view_controller.h"
|
| +
|
| +#import "base/mac/foundation_util.h"
|
| +#import "ios/chrome/browser/ui/suggestions/suggestions_item.h"
|
| +
|
| +#if !defined(__has_feature) || !__has_feature(objc_arc)
|
| +#error "This file requires ARC support."
|
| +#endif
|
| +
|
| +@implementation SuggestionsViewController {
|
| + BOOL _removeMe;
|
| +}
|
| +
|
| +@synthesize dataSourceDelegate = _dataSourceDelegate;
|
| +@synthesize actionsDelegate = _actionsDelegate;
|
| +
|
| +#pragma mark - UIViewController
|
| +
|
| +- (void)viewDidLoad {
|
| + [super viewDidLoad];
|
| +
|
| + self.collectionView.delegate = self;
|
| + self.styler.cellStyle = MDCCollectionViewCellStyleCard;
|
| +}
|
| +
|
| +#pragma mark - UICollectionViewDelegate
|
| +
|
| +- (BOOL)collectionView:(UICollectionView*)collectionView
|
| + shouldSelectItemAtIndexPath:(NSIndexPath*)indexPath {
|
| + [super collectionView:(UICollectionView*)collectionView
|
| + shouldSelectItemAtIndexPath:(NSIndexPath*)indexPath];
|
| +
|
| + return YES;
|
| +}
|
| +
|
| +#pragma mark - MDCCollectionViewStylingDelegate
|
| +
|
| +- (CGFloat)collectionView:(UICollectionView*)collectionView
|
| + cellHeightAtIndexPath:(NSIndexPath*)indexPath {
|
| + return [self.dataSourceDelegate collectionView:collectionView
|
| + cellHeightAtIndexPath:indexPath];
|
| +}
|
| +
|
| +- (void)buttonPressed {
|
| + [self.actionsDelegate addItem];
|
| +}
|
| +
|
| +@end
|
|
|