Chromium Code Reviews| Index: ios/chrome/browser/ui/content_suggestions/content_suggestions_image_updater.h |
| diff --git a/ios/chrome/browser/ui/content_suggestions/content_suggestions_image_updater.h b/ios/chrome/browser/ui/content_suggestions/content_suggestions_image_updater.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..10684d1cdb023987d63e4d16dd04fcd398a2075e |
| --- /dev/null |
| +++ b/ios/chrome/browser/ui/content_suggestions/content_suggestions_image_updater.h |
| @@ -0,0 +1,35 @@ |
| +// Copyright 2017 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_IMAGE_UPDATER_H_ |
| +#define IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_IMAGE_UPDATER_H_ |
| + |
| +#import <UIKit/UIKit.h> |
| + |
| +@class ContentSuggestionsArticleItem; |
| +@class ContentSuggestionsImageUpdater; |
| + |
| +// Delegate for ContentSuggestionsImageUpdater. It gets notified when the |
| +// ImageUpdater receive an image. |
|
lpromero
2017/02/14 10:52:27
receives
gambard
2017/02/14 14:03:43
Done.
|
| +@protocol ContentSuggestionsImageUpdaterDelegate |
| + |
| +- (void)contentSuggestionsImageUpdater: |
| + (ContentSuggestionsImageUpdater*)imageUpdater |
| + receivedImage:(UIImage*)image; |
| + |
| +@end |
| + |
| +// When receiving an image, it notifies its delegate. |
| +@interface ContentSuggestionsImageUpdater : NSObject |
| + |
| +@property(nonatomic, weak) ContentSuggestionsArticleItem* item; |
| +@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.
|
| + |
| +@property(nonatomic, weak) id<ContentSuggestionsImageUpdaterDelegate> delegate; |
| + |
| +- (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.
|
| + |
| +@end |
| + |
| +#endif // IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_IMAGE_UPDATER_H_ |