| OLD | NEW |
| 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 Loading... |
| 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_ |
| OLD | NEW |