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 #ifndef IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_VIEW_CONTR OLLER_H_ | 5 #ifndef IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_VIEW_CONTR OLLER_H_ |
6 #define IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_VIEW_CONTR OLLER_H_ | 6 #define IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_VIEW_CONTR OLLER_H_ |
7 | 7 |
8 #import <UIKit/UIKit.h> | 8 #import <UIKit/UIKit.h> |
9 | 9 |
10 #import "ios/chrome/browser/ui/collection_view/collection_view_controller.h" | 10 #import "ios/chrome/browser/ui/collection_view/collection_view_controller.h" |
11 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_expandabl e_item.h" | 11 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_expandabl e_item.h" |
12 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_favicon_i tem.h" | 12 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_favicon_i tem.h" |
13 | 13 |
14 @protocol ContentSuggestionsCommands; | 14 @protocol ContentSuggestionsCommands; |
15 @protocol ContentSuggestionsDataSource; | 15 @protocol ContentSuggestionsDataSource; |
16 @protocol ContentSuggestionIdentification; | |
16 | 17 |
17 // CollectionViewController to display the suggestions items. | 18 // CollectionViewController to display the suggestions items. |
18 @interface ContentSuggestionsViewController | 19 @interface ContentSuggestionsViewController |
19 : CollectionViewController<ContentSuggestionsExpandableCellDelegate, | 20 : CollectionViewController<ContentSuggestionsExpandableCellDelegate, |
20 ContentSuggestionsFaviconCellDelegate> | 21 ContentSuggestionsFaviconCellDelegate> |
21 | 22 |
22 - (instancetype)initWithStyle:(CollectionViewControllerStyle)style | 23 - (instancetype)initWithStyle:(CollectionViewControllerStyle)style |
23 dataSource:(id<ContentSuggestionsDataSource>)dataSource | 24 dataSource:(id<ContentSuggestionsDataSource>)dataSource |
24 NS_DESIGNATED_INITIALIZER; | 25 NS_DESIGNATED_INITIALIZER; |
25 | 26 |
26 - (instancetype)initWithStyle:(CollectionViewControllerStyle)style | 27 - (instancetype)initWithStyle:(CollectionViewControllerStyle)style |
27 NS_UNAVAILABLE; | 28 NS_UNAVAILABLE; |
28 | 29 |
29 // Handler for the commands sent by the ContentSuggestionsViewController. | 30 // Handler for the commands sent by the ContentSuggestionsViewController. |
30 @property(nonatomic, weak) id<ContentSuggestionsCommands> | 31 @property(nonatomic, weak) id<ContentSuggestionsCommands> |
31 suggestionCommandHandler; | 32 suggestionCommandHandler; |
33 // Override from superclass. | |
lpromero
2017/03/09 10:00:44
Add that it's to have a more specific type.
gambard
2017/03/09 12:21:23
Done.
| |
34 @property(nonatomic, readonly) | |
35 CollectionViewModel<CollectionViewItem<ContentSuggestionIdentification>*>* | |
36 collectionViewModel; | |
32 | 37 |
33 // Removes the entry at |indexPath|, from the collection and its model. | 38 // Removes the entry at |indexPath|, from the collection and its model. |
34 - (void)dismissEntryAtIndexPath:(NSIndexPath*)indexPath; | 39 - (void)dismissEntryAtIndexPath:(NSIndexPath*)indexPath; |
35 | 40 |
36 @end | 41 @end |
37 | 42 |
38 #endif // IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_VIEW_CO NTROLLER_H_ | 43 #endif // IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_VIEW_CO NTROLLER_H_ |
OLD | NEW |