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

Side by Side Diff: ios/chrome/browser/ui/content_suggestions/content_suggestions_collection_updater.mm

Issue 2761753002: Cleanup ContentSuggestions cells (Closed)
Patch Set: Fix tests Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_collectio n_updater.h" 5 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_collectio n_updater.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/mac/foundation_util.h" 8 #include "base/mac/foundation_util.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #import "ios/chrome/browser/ui/collection_view/cells/collection_view_text_item.h " 10 #import "ios/chrome/browser/ui/collection_view/cells/collection_view_text_item.h "
11 #import "ios/chrome/browser/ui/collection_view/collection_view_controller.h" 11 #import "ios/chrome/browser/ui/collection_view/collection_view_controller.h"
12 #import "ios/chrome/browser/ui/collection_view/collection_view_model.h" 12 #import "ios/chrome/browser/ui/collection_view/collection_view_model.h"
13 #import "ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_art icle_item.h"
14 #import "ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_but ton_item.h"
15 #import "ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_exp andable_item.h"
16 #import "ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_fav icon_item.h"
17 #import "ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_foo ter_item.h"
18 #import "ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_sta ck_item.h"
13 #import "ios/chrome/browser/ui/content_suggestions/content_suggestion.h" 19 #import "ios/chrome/browser/ui/content_suggestions/content_suggestion.h"
14 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_article_i tem.h"
15 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_data_sink .h" 20 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_data_sink .h"
16 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_data_sour ce.h" 21 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_data_sour ce.h"
17 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_expandabl e_item.h"
18 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_favicon_i tem.h"
19 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_footer_it em.h"
20 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_image_fet cher.h" 22 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_image_fet cher.h"
21 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_stack_ite m.h"
22 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_text_item .h"
23 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_view_cont roller.h" 23 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_view_cont roller.h"
24 #import "ios/chrome/browser/ui/content_suggestions/identifier/content_suggestion _identifier.h" 24 #import "ios/chrome/browser/ui/content_suggestions/identifier/content_suggestion _identifier.h"
25 #import "ios/chrome/browser/ui/content_suggestions/identifier/content_suggestion s_section_information.h" 25 #import "ios/chrome/browser/ui/content_suggestions/identifier/content_suggestion s_section_information.h"
26 #include "ui/gfx/image/image.h" 26 #include "ui/gfx/image/image.h"
27 #include "url/gurl.h" 27 #include "url/gurl.h"
28 28
29 #if !defined(__has_feature) || !__has_feature(objc_arc) 29 #if !defined(__has_feature) || !__has_feature(objc_arc)
30 #error "This file requires ARC support." 30 #error "This file requires ARC support."
31 #endif 31 #endif
32 32
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 }]; 362 }];
363 } 363 }
364 364
365 // Adds the |suggestions| to the collection view. All the suggestions must have 365 // Adds the |suggestions| to the collection view. All the suggestions must have
366 // the same sectionInfo. 366 // the same sectionInfo.
367 - (void)moreSuggestionsFetched:(NSArray<ContentSuggestion*>*)suggestions { 367 - (void)moreSuggestionsFetched:(NSArray<ContentSuggestion*>*)suggestions {
368 [self.collectionViewController addSuggestions:suggestions]; 368 [self.collectionViewController addSuggestions:suggestions];
369 } 369 }
370 370
371 @end 371 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698