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

Unified Diff: ios/chrome/browser/ui/content_suggestions/content_suggestions_view_controller.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/content_suggestions_view_controller.h
diff --git a/ios/chrome/browser/ui/content_suggestions/content_suggestions_view_controller.h b/ios/chrome/browser/ui/content_suggestions/content_suggestions_view_controller.h
index b5291270a9f63b02c2c50b5ae6e1dc1cbf96b61b..88d7457e3a87ad8553a6f103123fcf2636667108 100644
--- a/ios/chrome/browser/ui/content_suggestions/content_suggestions_view_controller.h
+++ b/ios/chrome/browser/ui/content_suggestions/content_suggestions_view_controller.h
@@ -9,10 +9,10 @@
#import "ios/chrome/browser/ui/collection_view/collection_view_controller.h"
-@class ContentSuggestion;
+@class ContentSuggestionsSectionInformation;
@protocol ContentSuggestionsCommands;
@protocol ContentSuggestionsDataSource;
-@protocol ContentSuggestionIdentification;
+@protocol SuggestedContent;
// CollectionViewController to display the suggestions items.
@interface ContentSuggestionsViewController : CollectionViewController
@@ -29,15 +29,18 @@
suggestionCommandHandler;
// Override from superclass to have a more specific type.
@property(nonatomic, readonly)
- CollectionViewModel<CollectionViewItem<ContentSuggestionIdentification>*>*
+ CollectionViewModel<CollectionViewItem<SuggestedContent>*>*
collectionViewModel;
// Removes the entry at |indexPath|, from the collection and its model.
- (void)dismissEntryAtIndexPath:(NSIndexPath*)indexPath;
// Removes the |section|.
- (void)dismissSection:(NSInteger)section;
-// Adds the |suggestions| to the collection and its model.
-- (void)addSuggestions:(NSArray<ContentSuggestion*>*)suggestions;
+// Adds the |suggestions| to the collection and its model in the section
+// corresponding to |sectionInfo|.
+- (void)addSuggestions:
+ (NSArray<CollectionViewItem<SuggestedContent>*>*)suggestions
+ toSectionInfo:(ContentSuggestionsSectionInformation*)sectionInfo;
@end

Powered by Google App Engine
This is Rietveld 408576698