Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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_SUGGESTION_H_ | 5 #ifndef IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTION_H_ |
| 6 #define IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTION_H_ | 6 #define IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTION_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_model.h" | |
| 11 #include "url/gurl.h" | |
| 12 | |
| 13 @class ContentSuggestionsImageUpdater; | |
| 14 @class ContentSuggestionsSectionInformation; | |
| 15 | |
| 16 // Enum defining the ItemType of this ContentSuggestionsCollectionUpdater. | |
| 17 typedef NS_ENUM(NSInteger, ContentSuggestionsItemType) { | |
| 18 ContentSuggestionsItemTypeText = kItemTypeEnumZero, | |
| 19 ContentSuggestionsItemTypeArticle, | |
| 20 ContentSuggestionsItemTypeExpand, | |
| 21 ContentSuggestionsItemTypeStack, | |
| 22 ContentSuggestionsItemTypeFavicon, | |
| 23 }; | |
| 24 | |
| 10 // Data for a suggestions item, compatible with Objective-C. | 25 // Data for a suggestions item, compatible with Objective-C. |
| 11 @interface ContentSuggestion : NSObject | 26 @interface ContentSuggestion : NSObject |
| 12 | 27 |
| 28 // Title of the suggestion. | |
| 13 @property(nonatomic, copy) NSString* title; | 29 @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.
| |
| 30 // Text for the suggestion. | |
| 31 @property(nonatomic, copy) NSString* text; | |
| 32 // Image for the suggestion. | |
| 14 @property(nonatomic, strong) UIImage* image; | 33 @property(nonatomic, strong) UIImage* image; |
| 34 // URL associated with the suggestion. | |
| 35 @property(nonatomic, assign) GURL url; | |
| 36 | |
| 37 // Section information in which this suggestion should be. | |
| 38 @property(nonatomic, strong) ContentSuggestionsSectionInformation* section; | |
| 39 @property(nonatomic, assign) ContentSuggestionsItemType type; | |
| 40 | |
| 41 // Image updater for this suggestion. When setting this imageUpdater, the | |
| 42 // suggestion puts itself as delegate for it, and updates its image when the | |
| 43 // ImageUpdater receives a new one. | |
| 44 @property(nonatomic, strong) ContentSuggestionsImageUpdater* imageUpdater; | |
|
stkhapugin
2017/02/14 16:34:19
Discussed offline
gambard
2017/02/15 10:17:56
Done.
| |
| 15 | 45 |
| 16 @end | 46 @end |
| 17 | 47 |
| 18 #endif // IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTION_H_ | 48 #endif // IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTION_H_ |
| OLD | NEW |