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 #include "url/gurl.h" | |
| 11 | |
| 12 @class ContentSuggestionsSectionInformation; | |
| 13 | |
| 14 // Enum defining the type of a ContentSuggestions. | |
| 15 typedef NS_ENUM(NSInteger, ContentSuggestionType) { | |
| 16 ContentSuggestionTypeArticle | |
| 17 }; | |
| 18 | |
| 10 // Data for a suggestions item, compatible with Objective-C. | 19 // Data for a suggestions item, compatible with Objective-C. |
|
stkhapugin
2017/02/15 15:35:42
Optional: maybe something like - objc wrapper for
gambard
2017/02/16 10:06:30
Well, the description is about the same :D
Done.
| |
| 11 @interface ContentSuggestion : NSObject | 20 @interface ContentSuggestion : NSObject |
| 12 | 21 |
| 13 @property(nonatomic, copy) NSString* title; | 22 // Title of the suggestion. |
| 14 @property(nonatomic, strong) UIImage* image; | 23 @property(nonatomic, copy, nullable) NSString* title; |
| 24 // Text for the suggestion. | |
| 25 @property(nonatomic, copy, nullable) NSString* text; | |
| 26 // Image for the suggestion. | |
| 27 @property(nonatomic, strong, nullable) UIImage* image; | |
| 28 // URL associated with the suggestion. | |
| 29 @property(nonatomic, assign) GURL url; | |
| 30 | |
| 31 // Section information in which this suggestion should be. | |
| 32 @property(nonatomic, strong, nullable) | |
| 33 ContentSuggestionsSectionInformation* section; | |
| 34 @property(nonatomic, assign) ContentSuggestionType type; | |
| 15 | 35 |
| 16 @end | 36 @end |
| 17 | 37 |
| 18 #endif // IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTION_H_ | 38 #endif // IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTION_H_ |
| OLD | NEW |