| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_ | 5 #ifndef COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_ |
| 6 #define COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_ | 6 #define COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 | 130 |
| 131 // (Re)schedules the periodic fetching of snippets. This is necessary because | 131 // (Re)schedules the periodic fetching of snippets. This is necessary because |
| 132 // the schedule depends on the time of day. | 132 // the schedule depends on the time of day. |
| 133 void RescheduleFetching(); | 133 void RescheduleFetching(); |
| 134 | 134 |
| 135 // ContentSuggestionsProvider implementation | 135 // ContentSuggestionsProvider implementation |
| 136 // TODO(pke): At some point reorder the implementations in the .cc file | 136 // TODO(pke): At some point reorder the implementations in the .cc file |
| 137 // accordingly. | 137 // accordingly. |
| 138 std::vector<Category> GetProvidedCategories() override; | 138 std::vector<Category> GetProvidedCategories() override; |
| 139 CategoryStatus GetCategoryStatus(Category category) override; | 139 CategoryStatus GetCategoryStatus(Category category) override; |
| 140 CategoryInfo GetCategoryInfo(Category category) override; |
| 140 void DismissSuggestion(const std::string& suggestion_id) override; | 141 void DismissSuggestion(const std::string& suggestion_id) override; |
| 141 void FetchSuggestionImage(const std::string& suggestion_id, | 142 void FetchSuggestionImage(const std::string& suggestion_id, |
| 142 const ImageFetchedCallback& callback) override; | 143 const ImageFetchedCallback& callback) override; |
| 143 void ClearCachedSuggestionsForDebugging() override; | 144 void ClearCachedSuggestionsForDebugging() override; |
| 144 void ClearDismissedSuggestionsForDebugging() override; | 145 void ClearDismissedSuggestionsForDebugging() override; |
| 145 | 146 |
| 146 // Returns the lists of suggestion hosts the snippets are restricted to. | 147 // Returns the lists of suggestion hosts the snippets are restricted to. |
| 147 std::set<std::string> GetSuggestionsHosts() const; | 148 std::set<std::string> GetSuggestionsHosts() const; |
| 148 | 149 |
| 149 // Returns the maximum number of snippets that will be shown at once. | 150 // Returns the maximum number of snippets that will be shown at once. |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 bool fetch_after_load_; | 307 bool fetch_after_load_; |
| 307 | 308 |
| 308 const Category provided_category_; | 309 const Category provided_category_; |
| 309 | 310 |
| 310 DISALLOW_COPY_AND_ASSIGN(NTPSnippetsService); | 311 DISALLOW_COPY_AND_ASSIGN(NTPSnippetsService); |
| 311 }; | 312 }; |
| 312 | 313 |
| 313 } // namespace ntp_snippets | 314 } // namespace ntp_snippets |
| 314 | 315 |
| 315 #endif // COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_ | 316 #endif // COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_ |
| OLD | NEW |