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

Side by Side Diff: ios/chrome/browser/ui/content_suggestions/content_suggestion.mm

Issue 2691593002: Connect ContentSuggestionsMediator to the ContentService (Closed)
Patch Set: Remove unused method 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 unified diff | Download patch
OLDNEW
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 #import "ios/chrome/browser/ui/content_suggestions/content_suggestion.h" 5 #import "ios/chrome/browser/ui/content_suggestions/content_suggestion.h"
6 6
7 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_image_upd ater.h"
8
7 #if !defined(__has_feature) || !__has_feature(objc_arc) 9 #if !defined(__has_feature) || !__has_feature(objc_arc)
8 #error "This file requires ARC support." 10 #error "This file requires ARC support."
9 #endif 11 #endif
10 12
13 @interface ContentSuggestion ()<ContentSuggestionsImageUpdaterDelegate>
14
15 @end
16
11 @implementation ContentSuggestion 17 @implementation ContentSuggestion
12 18
13 @synthesize title = _title; 19 @synthesize title = _title;
14 @synthesize image = _image; 20 @synthesize image = _image;
21 @synthesize text = _text;
22 @synthesize url = _url;
23
24 @synthesize section = _section;
25 @synthesize type = _type;
26
27 @synthesize imageUpdater = _imageUpdater;
28
29 - (void)setImageUpdater:(ContentSuggestionsImageUpdater*)imageUpdater {
30 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.
31 _imageUpdater = imageUpdater;
32 }
33
34 #pragma mark - ContentSuggestionsImageUpdaterDelegate
35
36 - (void)contentSuggestionsImageUpdater:
37 (ContentSuggestionsImageUpdater*)imageUpdater
38 receivedImage:(UIImage*)image {
39 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 :)
40 }
15 41
16 @end 42 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698