| 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_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_MEDIATOR_H_ | 5 #ifndef IOS_CHROME_BROWSER_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_MEDIATOR_H_ |
| 6 #define IOS_CHROME_BROWSER_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_MEDIATOR_H_ | 6 #define IOS_CHROME_BROWSER_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_MEDIATOR_H_ |
| 7 | 7 |
| 8 #import <UIKit/UIKit.h> | 8 #import <UIKit/UIKit.h> |
| 9 | 9 |
| 10 #include <memory> |
| 11 |
| 10 #import "ios/chrome/browser/content_suggestions/content_suggestions_mediator.h" | 12 #import "ios/chrome/browser/content_suggestions/content_suggestions_mediator.h" |
| 11 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_data_sour
ce.h" | 13 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_data_sour
ce.h" |
| 12 | 14 |
| 13 namespace favicon { | 15 namespace favicon { |
| 14 class LargeIconService; | 16 class LargeIconService; |
| 15 } | 17 } |
| 16 | 18 |
| 17 namespace ntp_snippets { | 19 namespace ntp_snippets { |
| 18 class ContentSuggestionsService; | 20 class ContentSuggestionsService; |
| 19 } | 21 } |
| 20 | 22 |
| 23 namespace ntp_tiles { |
| 24 class MostVisitedSites; |
| 25 } |
| 26 |
| 21 @class ContentSuggestionIdentifier; | 27 @class ContentSuggestionIdentifier; |
| 22 | 28 |
| 23 // Mediator for ContentSuggestions. Makes the interface between a | 29 // Mediator for ContentSuggestions. Makes the interface between a |
| 24 // ntp_snippets::ContentSuggestionsService and the Objective-C services using | 30 // ntp_snippets::ContentSuggestionsService and the Objective-C services using |
| 25 // its data. | 31 // its data. |
| 26 @interface ContentSuggestionsMediator : NSObject<ContentSuggestionsDataSource> | 32 @interface ContentSuggestionsMediator : NSObject<ContentSuggestionsDataSource> |
| 27 | 33 |
| 28 // Initialize the mediator with the |contentService| to mediate. | 34 // Initialize the mediator with the |contentService| to mediate. |
| 29 - (instancetype) | 35 - (instancetype) |
| 30 initWithContentService:(ntp_snippets::ContentSuggestionsService*)contentService | 36 initWithContentService:(ntp_snippets::ContentSuggestionsService*)contentService |
| 31 largeIconService:(favicon::LargeIconService*)largeIconService | 37 largeIconService:(favicon::LargeIconService*)largeIconService |
| 38 mostVisitedSite: |
| 39 (std::unique_ptr<ntp_tiles::MostVisitedSites>)mostVisitedSites |
| 32 NS_DESIGNATED_INITIALIZER; | 40 NS_DESIGNATED_INITIALIZER; |
| 33 - (instancetype)init NS_UNAVAILABLE; | 41 - (instancetype)init NS_UNAVAILABLE; |
| 34 | 42 |
| 35 // Dismisses the suggestion from the content suggestions service. It doesn't | 43 // Dismisses the suggestion from the content suggestions service. It doesn't |
| 36 // change the UI. | 44 // change the UI. |
| 37 - (void)dismissSuggestion:(ContentSuggestionIdentifier*)suggestionIdentifier; | 45 - (void)dismissSuggestion:(ContentSuggestionIdentifier*)suggestionIdentifier; |
| 38 | 46 |
| 39 @end | 47 @end |
| 40 | 48 |
| 41 #endif // IOS_CHROME_BROWSER_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_MEDIATOR_H
_ | 49 #endif // IOS_CHROME_BROWSER_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_MEDIATOR_H
_ |
| OLD | NEW |