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

Unified Diff: ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_item.h

Issue 2877513003: ContentSuggestionsDataSource returns CollectionViewItem (Closed)
Patch Set: Address comments Created 3 years, 7 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/cells/content_suggestions_item.h
diff --git a/ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_item.h b/ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_item.h
index a27b4823e0c099beddb087acb192eb620a4ac9af..72a12b1e0955f98a2048d546a833021b80935f20 100644
--- a/ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_item.h
+++ b/ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_item.h
@@ -6,7 +6,7 @@
#define IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CELLS_CONTENT_SUGGESTIONS_ITEM_H_
#import "ios/chrome/browser/ui/collection_view/cells/collection_view_item.h"
-#import "ios/chrome/browser/ui/content_suggestions/identifier/content_suggestion_identifier.h"
+#import "ios/chrome/browser/ui/content_suggestions/cells/suggested_content.h"
#import "ios/third_party/material_components_ios/src/components/CollectionCells/src/MaterialCollectionCells.h"
namespace base {
@@ -18,36 +18,22 @@ class Time;
@class FaviconViewNew;
class GURL;
-// Delegate for a ContentSuggestionsItem.
-@protocol ContentSuggestionsItemDelegate
-
-// Loads the image associated with this item.
-- (void)loadImageForSuggestionItem:(ContentSuggestionsItem*)suggestionItem;
-
-@end
-
// Item for an article in the suggestions.
-@interface ContentSuggestionsItem
- : CollectionViewItem<ContentSuggestionIdentification>
+@interface ContentSuggestionsItem : CollectionViewItem<SuggestedContent>
// Initialize an article with a |title|, a |subtitle|, an |image| and the |url|
// to the full article. |type| is the type of the item.
- (instancetype)initWithType:(NSInteger)type
title:(NSString*)title
subtitle:(NSString*)subtitle
- delegate:(id<ContentSuggestionsItemDelegate>)delegate
url:(const GURL&)url NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithType:(NSInteger)type NS_UNAVAILABLE;
@property(nonatomic, copy, readonly) NSString* title;
-@property(nonatomic, strong) UIImage* image;
@property(nonatomic, readonly, assign) GURL URL;
@property(nonatomic, copy) NSString* publisher;
@property(nonatomic, assign) base::Time publishDate;
-@property(nonatomic, weak) id<ContentSuggestionsItemDelegate> delegate;
-// Attributes for favicon.
-@property(nonatomic, strong) FaviconAttributes* attributes;
// Whether the suggestion has an image associated.
@property(nonatomic, assign) BOOL hasImage;
// Whether the suggestion is available offline. If YES, an icon is displayed.

Powered by Google App Engine
This is Rietveld 408576698