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_IMPL_H_ | 5 #ifndef COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_SERVICE_IMPL_H_ |
6 #define COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_SERVICE_IMPL_H_ | 6 #define COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_SERVICE_IMPL_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "components/offline_pages/core/prefetch/prefetch_gcm_handler.h" |
11 #include "components/offline_pages/core/prefetch/prefetch_service.h" | 12 #include "components/offline_pages/core/prefetch/prefetch_service.h" |
| 13 #include "components/offline_pages/core/prefetch/suggested_articles_observer.h" |
| 14 |
| 15 namespace ntp_snippets { |
| 16 class ContentSuggestionsService; |
| 17 } |
12 | 18 |
13 namespace offline_pages { | 19 namespace offline_pages { |
14 | 20 |
15 class PrefetchServiceImpl : public PrefetchService { | 21 class PrefetchServiceImpl : public PrefetchService { |
16 public: | 22 public: |
17 PrefetchServiceImpl(); | 23 PrefetchServiceImpl(); |
18 ~PrefetchServiceImpl() override; | 24 ~PrefetchServiceImpl() override; |
19 | 25 |
20 // PrefetchService implementation: | 26 // PrefetchService implementation: |
| 27 void ObserveContentSuggestionsService( |
| 28 ntp_snippets::ContentSuggestionsService* service) override; |
| 29 void AddPrefetchGCMHandler( |
| 30 std::unique_ptr<PrefetchGCMHandler> app_handler) override; |
21 PrefetchDispatcher* GetDispatcher() override; | 31 PrefetchDispatcher* GetDispatcher() override; |
22 | 32 |
23 // KeyedService implementation: | 33 // KeyedService implementation: |
24 void Shutdown() override; | 34 void Shutdown() override; |
25 | 35 |
26 private: | 36 private: |
| 37 std::unique_ptr<SuggestedArticlesObserver> suggested_articles_observer_; |
| 38 std::unique_ptr<PrefetchGCMHandler> gcm_handler_; |
| 39 |
27 std::unique_ptr<PrefetchDispatcher> dispatcher_; | 40 std::unique_ptr<PrefetchDispatcher> dispatcher_; |
28 | |
29 DISALLOW_COPY_AND_ASSIGN(PrefetchServiceImpl); | 41 DISALLOW_COPY_AND_ASSIGN(PrefetchServiceImpl); |
30 }; | 42 }; |
31 | 43 |
32 } // namespace offline_pages | 44 } // namespace offline_pages |
33 | 45 |
34 #endif // COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_SERVICE_IMPL_H_ | 46 #endif // COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_SERVICE_IMPL_H_ |
OLD | NEW |