OLD | NEW |
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/content_suggestion.h" | 13 #import "ios/chrome/browser/ui/content_suggestions/content_suggestion.h" |
14 #import "ios/chrome/browser/ui/content_suggestions/content_suggestion_identifier
.h" | |
15 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_article_i
tem.h" | 14 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_article_i
tem.h" |
16 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_data_sink
.h" | 15 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_data_sink
.h" |
17 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_data_sour
ce.h" | 16 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_data_sour
ce.h" |
18 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_expandabl
e_item.h" | 17 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_expandabl
e_item.h" |
19 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_favicon_i
tem.h" | 18 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_favicon_i
tem.h" |
20 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_footer_it
em.h" | 19 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_footer_it
em.h" |
21 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_image_fet
cher.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_section_i
nformation.h" | |
23 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_stack_ite
m.h" | 21 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_stack_ite
m.h" |
24 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_text_item
.h" | 22 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_text_item
.h" |
25 #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" |
| 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 |
33 namespace { | 33 namespace { |
34 | 34 |
35 // Enum defining the ItemType of this ContentSuggestionsCollectionUpdater. | 35 // Enum defining the ItemType of this ContentSuggestionsCollectionUpdater. |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |
OLD | NEW |