Chromium Code Reviews| 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..7752985a1775ece83663beb8c9469263222b04d2 100644 |
| --- a/ios/chrome/browser/ui/content_suggestions/content_suggestion.mm |
| +++ b/ios/chrome/browser/ui/content_suggestions/content_suggestion.mm |
| @@ -4,13 +4,39 @@ |
| #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 = self; |
|
lpromero
2017/02/14 10:52:27
To be cleaner, should you also unassigned yourself
gambard
2017/02/14 14:03:43
It cannot happen for now but it is cleaner.
Done.
|
| + _imageUpdater = imageUpdater; |
| +} |
| + |
| +#pragma mark - ContentSuggestionsImageUpdaterDelegate |
| + |
| +- (void)contentSuggestionsImageUpdater: |
| + (ContentSuggestionsImageUpdater*)imageUpdater |
| + receivedImage:(UIImage*)image { |
| + self.image = image; |
|
lpromero
2017/02/14 10:52:27
Does this object need to notify to observers/deleg
gambard
2017/02/14 14:03:42
ContentSuggestion does not have observers/delegate
lpromero
2017/02/14 15:43:32
I know they don't. The question is: should they? H
gambard
2017/02/15 10:17:56
Ok, the imageUpdater thing is not clear at all :)
|
| +} |
| @end |