OLD | NEW |
---|---|
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/chrome/browser/ui/suggestions/suggestions_view_controller.h" | 5 #import "ios/chrome/browser/ui/suggestions/suggestions_view_controller.h" |
6 | 6 |
7 #include "base/mac/foundation_util.h" | 7 #include "base/mac/foundation_util.h" |
8 #import "ios/chrome/browser/ui/collection_view/cells/MDCCollectionViewCell+Chrom e.h" | 8 #import "ios/chrome/browser/ui/collection_view/cells/MDCCollectionViewCell+Chrom e.h" |
9 #import "ios/chrome/browser/ui/collection_view/cells/collection_view_item.h" | 9 #import "ios/chrome/browser/ui/collection_view/cells/collection_view_item.h" |
10 #import "ios/chrome/browser/ui/collection_view/collection_view_model.h" | 10 #import "ios/chrome/browser/ui/collection_view/collection_view_model.h" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
67 #pragma mark - SuggestionsExpandableCellDelegate | 67 #pragma mark - SuggestionsExpandableCellDelegate |
68 | 68 |
69 - (void)collapseCell:(UICollectionViewCell*)cell { | 69 - (void)collapseCell:(UICollectionViewCell*)cell { |
70 [self expand:NO cell:cell]; | 70 [self expand:NO cell:cell]; |
71 } | 71 } |
72 | 72 |
73 - (void)expandCell:(UICollectionViewCell*)cell { | 73 - (void)expandCell:(UICollectionViewCell*)cell { |
74 [self expand:YES cell:cell]; | 74 [self expand:YES cell:cell]; |
75 } | 75 } |
76 | 76 |
77 #pragma mark - SuggestionsFaviconCellDelegate | |
78 | |
79 - (void)openFaviconAtIndexPath:(NSIndexPath*)indexPath { | |
80 [self.suggestionCommandHandler openFaviconAtIndexPath:indexPath]; | |
lpromero
2017/01/18 09:34:39
This is where I think the suggestionCommandHandler
gambard
2017/01/18 12:37:58
Done.
| |
81 } | |
82 | |
77 #pragma mark - SuggestionsItemActions | 83 #pragma mark - SuggestionsItemActions |
78 | 84 |
79 - (void)addNewItem:(id)sender { | 85 - (void)addNewItem:(id)sender { |
80 [self.suggestionCommandHandler addEmptyItem]; | 86 [self.suggestionCommandHandler addEmptyItem]; |
81 } | 87 } |
82 | 88 |
83 #pragma mark - SuggestionsCollectionUpdater forwarding | 89 #pragma mark - SuggestionsCollectionUpdater forwarding |
84 | 90 |
85 - (void)addTextItem:(NSString*)title | 91 - (void)addTextItem:(NSString*)title |
86 subtitle:(NSString*)subtitle | 92 subtitle:(NSString*)subtitle |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
149 | 155 |
150 [UIView | 156 [UIView |
151 animateWithDuration:kAnimationDuration | 157 animateWithDuration:kAnimationDuration |
152 animations:^{ | 158 animations:^{ |
153 [self.collectionView.collectionViewLayout invalidateLayout]; | 159 [self.collectionView.collectionViewLayout invalidateLayout]; |
154 }]; | 160 }]; |
155 } | 161 } |
156 } | 162 } |
157 | 163 |
158 @end | 164 @end |
OLD | NEW |