| 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 #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 = nil; |
| 31 imageUpdater.delegate = self; |
| 32 _imageUpdater = imageUpdater; |
| 33 } |
| 34 |
| 35 #pragma mark - ContentSuggestionsImageUpdaterDelegate |
| 36 |
| 37 - (void)contentSuggestionsImageUpdater: |
| 38 (ContentSuggestionsImageUpdater*)imageUpdater |
| 39 receivedImage:(UIImage*)image { |
| 40 self.image = image; |
| 41 } |
| 15 | 42 |
| 16 @end | 43 @end |
| OLD | NEW |