Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_IMAGE_UPDA TER_H_ | |
| 6 #define IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_IMAGE_UPDA TER_H_ | |
| 7 | |
| 8 #import <UIKit/UIKit.h> | |
| 9 | |
| 10 @class ContentSuggestionsArticleItem; | |
| 11 @class ContentSuggestionsImageUpdater; | |
| 12 | |
| 13 // Delegate for ContentSuggestionsImageUpdater. It gets notified when the | |
| 14 // ImageUpdater receive an image. | |
|
lpromero
2017/02/14 10:52:27
receives
gambard
2017/02/14 14:03:43
Done.
| |
| 15 @protocol ContentSuggestionsImageUpdaterDelegate | |
| 16 | |
| 17 - (void)contentSuggestionsImageUpdater: | |
| 18 (ContentSuggestionsImageUpdater*)imageUpdater | |
| 19 receivedImage:(UIImage*)image; | |
| 20 | |
| 21 @end | |
| 22 | |
| 23 // When receiving an image, it notifies its delegate. | |
| 24 @interface ContentSuggestionsImageUpdater : NSObject | |
| 25 | |
| 26 @property(nonatomic, weak) ContentSuggestionsArticleItem* item; | |
| 27 @property(nonatomic, assign) NSInteger sectionIdentifier; | |
|
lpromero
2017/02/14 10:52:27
Why are these needed?
gambard
2017/02/14 14:03:43
To know the item associated with the ImageUpdater
lpromero
2017/02/14 15:43:32
Ack.
| |
| 28 | |
| 29 @property(nonatomic, weak) id<ContentSuggestionsImageUpdaterDelegate> delegate; | |
| 30 | |
| 31 - (void)receivedImage:(UIImage*)image; | |
|
lpromero
2017/02/14 10:52:27
Unit test that the delegate is called, with the pr
gambard
2017/02/14 14:03:43
Done.
| |
| 32 | |
| 33 @end | |
| 34 | |
| 35 #endif // IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_IMAGE_U PDATER_H_ | |
| OLD | NEW |