Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Unified Diff: ios/chrome/browser/ui/content_suggestions/content_suggestion.h

Issue 2691593002: Connect ContentSuggestionsMediator to the ContentService (Closed)
Patch Set: Address comments Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..d13587ed14fd383fac9d6f85f505e2588b24b1c5 100644
--- a/ios/chrome/browser/ui/content_suggestions/content_suggestion.h
+++ b/ios/chrome/browser/ui/content_suggestions/content_suggestion.h
@@ -7,11 +7,32 @@
#import <UIKit/UIKit.h>
-// Data for a suggestions item, compatible with Objective-C.
+#include "url/gurl.h"
+
+@class ContentSuggestionsSectionInformation;
+
+// Enum defining the type of a ContentSuggestions.
+typedef NS_ENUM(NSInteger, ContentSuggestionType) {
+ ContentSuggestionTypeArticle
marq (ping after 24h) 2017/02/16 13:14:35 Set an initial value for the first enum value. An
gambard 2017/02/16 13:45:53 Because almost all "typedef NS_ENUM" are using Mac
+};
+
+// Data for a suggestions item, compatible with Objective-C. Most acts as a
marq (ping after 24h) 2017/02/16 13:14:35 Most -> Mostly
gambard 2017/02/16 13:45:53 Done.
+// wrapper for ntp_snippets::ContentSuggestion.
@interface ContentSuggestion : NSObject
-@property(nonatomic, copy) NSString* title;
-@property(nonatomic, strong) UIImage* image;
+// Title of the suggestion.
+@property(nonatomic, copy, nullable) NSString* title;
+// Text for the suggestion.
+@property(nonatomic, copy, nullable) NSString* text;
+// Image for the suggestion.
+@property(nonatomic, strong, nullable) UIImage* image;
+// URL associated with the suggestion.
+@property(nonatomic, assign) GURL url;
+
+// Section information in which this suggestion should be.
+@property(nonatomic, strong, nullable)
+ ContentSuggestionsSectionInformation* section;
+@property(nonatomic, assign) ContentSuggestionType type;
@end

Powered by Google App Engine
This is Rietveld 408576698