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

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

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.mm
diff --git a/ios/chrome/browser/ui/content_suggestions/content_suggestion.mm b/ios/chrome/browser/ui/content_suggestions/content_suggestion.mm
index 0d25178ed478f608d6eb5eeff0d74e51e6db7aad..97180dd20d85b904f6ee3211da43928d3c935c41 100644
--- a/ios/chrome/browser/ui/content_suggestions/content_suggestion.mm
+++ b/ios/chrome/browser/ui/content_suggestions/content_suggestion.mm
@@ -4,13 +4,40 @@
#import "ios/chrome/browser/ui/content_suggestions/content_suggestion.h"
+#import "ios/chrome/browser/ui/content_suggestions/content_suggestions_image_updater.h"
+
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif
+@interface ContentSuggestion ()<ContentSuggestionsImageUpdaterDelegate>
+
+@end
+
@implementation ContentSuggestion
@synthesize title = _title;
@synthesize image = _image;
+@synthesize text = _text;
+@synthesize url = _url;
+
+@synthesize section = _section;
+@synthesize type = _type;
+
+@synthesize imageUpdater = _imageUpdater;
+
+- (void)setImageUpdater:(ContentSuggestionsImageUpdater*)imageUpdater {
+ _imageUpdater.delegate = nil;
+ imageUpdater.delegate = self;
+ _imageUpdater = imageUpdater;
+}
+
+#pragma mark - ContentSuggestionsImageUpdaterDelegate
+
+- (void)contentSuggestionsImageUpdater:
+ (ContentSuggestionsImageUpdater*)imageUpdater
+ receivedImage:(UIImage*)image {
+ self.image = image;
+}
@end

Powered by Google App Engine
This is Rietveld 408576698