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

Unified Diff: ios/chrome/browser/ui/content_suggestions/content_suggestions_image_updater.h

Issue 2691593002: Connect ContentSuggestionsMediator to the ContentService (Closed)
Patch Set: Address comments 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 side-by-side diff with in-line comments
Download patch
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_

Powered by Google App Engine
This is Rietveld 408576698