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..bbf8a49af4cf9034bb152ff35d42ead5938f61e6 |
| --- /dev/null |
| +++ b/ios/chrome/browser/ui/content_suggestions/content_suggestions_image_updater.h |
| @@ -0,0 +1,37 @@ |
| +// 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 receives an image. |
| +@protocol ContentSuggestionsImageUpdaterDelegate |
| + |
| +- (void)contentSuggestionsImageUpdater: |
| + (ContentSuggestionsImageUpdater*)imageUpdater |
| + receivedImage:(UIImage*)image; |
| + |
| +@end |
| + |
| +// When receiving an image, it notifies its delegate. |
| +@interface ContentSuggestionsImageUpdater : NSObject |
| + |
| +// Item, and its section identifier, associated with this ImageUpdater. The |
| +// image updater does not update it in any way. |
| +@property(nonatomic, weak) ContentSuggestionsArticleItem* item; |
| +@property(nonatomic, assign) NSInteger sectionIdentifier; |
| + |
| +@property(nonatomic, weak) id<ContentSuggestionsImageUpdaterDelegate> delegate; |
| + |
| +- (void)receivedImage:(UIImage*)image; |
|
stkhapugin
2017/02/14 16:34:19
Per offline discussion, this is not a great way of
gambard
2017/02/15 10:17:56
Done.
|
| + |
| +@end |
| + |
| +#endif // IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_IMAGE_UPDATER_H_ |