Chromium Code Reviews| Index: ios/chrome/browser/ui/content_suggestions/content_suggestion.h |
| diff --git a/ios/chrome/browser/ui/content_suggestions/content_suggestion.h b/ios/chrome/browser/ui/content_suggestions/content_suggestion.h |
| index 68bcf1b502694bf31c36dad50ebcf666f6069e49..1029a2887326fb1923faaf5240c032c95f70362e 100644 |
| --- a/ios/chrome/browser/ui/content_suggestions/content_suggestion.h |
| +++ b/ios/chrome/browser/ui/content_suggestions/content_suggestion.h |
| @@ -7,11 +7,41 @@ |
| #import <UIKit/UIKit.h> |
| +#import "ios/chrome/browser/ui/collection_view/collection_view_model.h" |
| +#include "url/gurl.h" |
| + |
| +@class ContentSuggestionsImageUpdater; |
| +@class ContentSuggestionsSectionInformation; |
| + |
| +// Enum defining the ItemType of this ContentSuggestionsCollectionUpdater. |
| +typedef NS_ENUM(NSInteger, ContentSuggestionsItemType) { |
| + ContentSuggestionsItemTypeText = kItemTypeEnumZero, |
| + ContentSuggestionsItemTypeArticle, |
| + ContentSuggestionsItemTypeExpand, |
| + ContentSuggestionsItemTypeStack, |
| + ContentSuggestionsItemTypeFavicon, |
| +}; |
| + |
| // Data for a suggestions item, compatible with Objective-C. |
| @interface ContentSuggestion : NSObject |
| +// Title of the suggestion. |
| @property(nonatomic, copy) NSString* title; |
|
stkhapugin
2017/02/14 16:34:18
Optional: this is a really small header, why don't
gambard
2017/02/15 10:17:56
Done.
|
| +// Text for the suggestion. |
| +@property(nonatomic, copy) NSString* text; |
| +// Image for the suggestion. |
| @property(nonatomic, strong) UIImage* image; |
| +// URL associated with the suggestion. |
| +@property(nonatomic, assign) GURL url; |
| + |
| +// Section information in which this suggestion should be. |
| +@property(nonatomic, strong) ContentSuggestionsSectionInformation* section; |
| +@property(nonatomic, assign) ContentSuggestionsItemType type; |
| + |
| +// Image updater for this suggestion. When setting this imageUpdater, the |
| +// suggestion puts itself as delegate for it, and updates its image when the |
| +// ImageUpdater receives a new one. |
| +@property(nonatomic, strong) ContentSuggestionsImageUpdater* imageUpdater; |
|
stkhapugin
2017/02/14 16:34:19
Discussed offline
gambard
2017/02/15 10:17:56
Done.
|
| @end |