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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 SHUT_DOWN | 199 SHUT_DOWN |
200 }; | 200 }; |
201 | 201 |
202 // sync_driver::SyncServiceObserver implementation. | 202 // sync_driver::SyncServiceObserver implementation. |
203 void OnStateChanged() override; | 203 void OnStateChanged() override; |
204 | 204 |
205 // image_fetcher::ImageFetcherDelegate implementation. | 205 // image_fetcher::ImageFetcherDelegate implementation. |
206 void OnImageDataFetched(const std::string& snippet_id, | 206 void OnImageDataFetched(const std::string& snippet_id, |
207 const std::string& image_data) override; | 207 const std::string& image_data) override; |
208 | 208 |
209 // Callback for the NTPSnippetsDatabase. | 209 // Callbacks for the NTPSnippetsDatabase. |
210 void OnDatabaseLoaded(NTPSnippet::PtrVector snippets); | 210 void OnDatabaseLoaded(NTPSnippet::PtrVector snippets); |
| 211 void OnDatabaseError(); |
211 | 212 |
212 // Callback for the SuggestionsService. | 213 // Callback for the SuggestionsService. |
213 void OnSuggestionsChanged(const suggestions::SuggestionsProfile& suggestions); | 214 void OnSuggestionsChanged(const suggestions::SuggestionsProfile& suggestions); |
214 | 215 |
215 // Callback for the NTPSnippetsFetcher. | 216 // Callback for the NTPSnippetsFetcher. |
216 void OnFetchFinished(NTPSnippetsFetcher::OptionalSnippets snippets); | 217 void OnFetchFinished(NTPSnippetsFetcher::OptionalSnippets snippets); |
217 | 218 |
218 // Merges newly available snippets with the previously available list. | 219 // Merges newly available snippets with the previously available list. |
219 void MergeSnippets(NTPSnippet::PtrVector new_snippets); | 220 void MergeSnippets(NTPSnippet::PtrVector new_snippets); |
220 | 221 |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 // or because a requirement (e.g. History Sync) is not fulfilled anymore. | 335 // or because a requirement (e.g. History Sync) is not fulfilled anymore. |
335 virtual void NTPSnippetsServiceDisabled() = 0; | 336 virtual void NTPSnippetsServiceDisabled() = 0; |
336 | 337 |
337 protected: | 338 protected: |
338 virtual ~NTPSnippetsServiceObserver() {} | 339 virtual ~NTPSnippetsServiceObserver() {} |
339 }; | 340 }; |
340 | 341 |
341 } // namespace ntp_snippets | 342 } // namespace ntp_snippets |
342 | 343 |
343 #endif // COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_ | 344 #endif // COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_ |
OLD | NEW |