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

Side by Side Diff: ios/chrome/browser/ui/content_suggestions/content_suggestions_data_source.h

Issue 2818453002: Download favicon from server for suggested articles (Closed)
Patch Set: Address comments Created 3 years, 8 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
« no previous file with comments | « ios/chrome/browser/ui/content_suggestions/content_suggestions_collection_updater.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 #ifndef IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_DATA_SOURC E_H_ 5 #ifndef IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_DATA_SOURC E_H_
6 #define IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_DATA_SOURC E_H_ 6 #define IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_DATA_SOURC E_H_
7 7
8 @class ContentSuggestion; 8 @class ContentSuggestion;
9 @class ContentSuggestionIdentifier; 9 @class ContentSuggestionIdentifier;
10 @class ContentSuggestionsSectionInformation; 10 @class ContentSuggestionsSectionInformation;
(...skipping 22 matching lines...) Expand all
33 33
34 // Returns an image updater for the suggestions provided by this data source. 34 // Returns an image updater for the suggestions provided by this data source.
35 - (nullable id<ContentSuggestionsImageFetcher>)imageFetcher; 35 - (nullable id<ContentSuggestionsImageFetcher>)imageFetcher;
36 36
37 // Fetches favicon attributes and calls the completion block. 37 // Fetches favicon attributes and calls the completion block.
38 - (void)fetchFaviconAttributesForURL:(const GURL&)URL 38 - (void)fetchFaviconAttributesForURL:(const GURL&)URL
39 completion: 39 completion:
40 (void (^_Nonnull)(FaviconAttributes* _Nonnull)) 40 (void (^_Nonnull)(FaviconAttributes* _Nonnull))
41 completion; 41 completion;
42 42
43 // Fetches favicon image associated with this |suggestion| in history. If it is
44 // not present in the history, tries to download it. Calls the completion block
45 // if an image has been found.
46 // This can only be used for public URL.
47 - (void)
48 fetchFaviconImageForSuggestion:(nonnull ContentSuggestionIdentifier*)suggestion
49 completion:(void (^_Nonnull)(UIImage* _Nonnull))completion;
50
43 // Fetches additional content. All the |knownSuggestions| must come from the 51 // Fetches additional content. All the |knownSuggestions| must come from the
44 // same |sectionInfo|. If the fetch was completed, the given |callback| is 52 // same |sectionInfo|. If the fetch was completed, the given |callback| is
45 // called with the new content. 53 // called with the new content.
46 - (void)fetchMoreSuggestionsKnowing: 54 - (void)fetchMoreSuggestionsKnowing:
47 (nullable NSArray<ContentSuggestionIdentifier*>*)knownSuggestions 55 (nullable NSArray<ContentSuggestionIdentifier*>*)knownSuggestions
48 fromSectionInfo: 56 fromSectionInfo:
49 (nonnull ContentSuggestionsSectionInformation*) 57 (nonnull ContentSuggestionsSectionInformation*)
50 sectionInfo 58 sectionInfo
51 callback:(nullable MoreSuggestionsFetched)callback; 59 callback:(nullable MoreSuggestionsFetched)callback;
52 60
53 @end 61 @end
54 62
55 #endif // IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_DATA_SO URCE_H_ 63 #endif // IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_DATA_SO URCE_H_
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/content_suggestions/content_suggestions_collection_updater.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698