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 COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_SERVICE_H_ | 5 #ifndef COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_SERVICE_H_ |
6 #define COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_SERVICE_H_ | 6 #define COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_SERVICE_H_ |
7 | 7 |
8 #include "components/keyed_service/core/keyed_service.h" | 8 #include "components/keyed_service/core/keyed_service.h" |
9 | 9 |
| 10 namespace ntp_snippets { |
| 11 class ContentSuggestionsService; |
| 12 } |
| 13 |
10 namespace offline_pages { | 14 namespace offline_pages { |
11 | 15 |
12 class PrefetchDispatcher; | 16 class PrefetchDispatcher; |
| 17 class PrefetchGCMHandler; |
13 | 18 |
14 // Main class and entry point for the Offline Pages Prefetching feature, that | 19 // Main class and entry point for the Offline Pages Prefetching feature, that |
15 // controls the lifetime of all major subcomponents of the prefetching system. | 20 // controls the lifetime of all major subcomponents of the prefetching system. |
16 class PrefetchService : public KeyedService { | 21 class PrefetchService : public KeyedService { |
17 public: | 22 public: |
18 ~PrefetchService() override = default; | 23 ~PrefetchService() override = default; |
19 | 24 |
20 virtual PrefetchDispatcher* GetDispatcher() = 0; | 25 virtual PrefetchDispatcher* GetDispatcher() = 0; |
| 26 virtual PrefetchGCMHandler* GetPrefetchGCMHandler() = 0; |
| 27 |
| 28 // Called at construction of the ContentSuggestionsService to begin observing |
| 29 // events related to incoming articles. |
| 30 virtual void ObserveContentSuggestionsService( |
| 31 ntp_snippets::ContentSuggestionsService* service) = 0; |
21 }; | 32 }; |
22 | 33 |
23 } // namespace offline_pages | 34 } // namespace offline_pages |
24 | 35 |
25 #endif // COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_SERVICE_H_ | 36 #endif // COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_SERVICE_H_ |
OLD | NEW |