OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_OFFLINE_PAGES_RECENT_TAB_SUGGESTIONS_PROVIDER_H_ | 5 #ifndef COMPONENTS_NTP_SNIPPETS_OFFLINE_PAGES_RECENT_TAB_SUGGESTIONS_PROVIDER_H_ |
6 #define COMPONENTS_NTP_SNIPPETS_OFFLINE_PAGES_RECENT_TAB_SUGGESTIONS_PROVIDER_H_ | 6 #define COMPONENTS_NTP_SNIPPETS_OFFLINE_PAGES_RECENT_TAB_SUGGESTIONS_PROVIDER_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/callback_forward.h" | 12 #include "base/callback_forward.h" |
13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
15 #include "base/time/time.h" | 15 #include "base/time/time.h" |
16 #include "components/ntp_snippets/category.h" | 16 #include "components/ntp_snippets/category.h" |
17 #include "components/ntp_snippets/category_factory.h" | 17 #include "components/ntp_snippets/category_factory.h" |
18 #include "components/ntp_snippets/category_status.h" | 18 #include "components/ntp_snippets/category_status.h" |
19 #include "components/ntp_snippets/content_suggestion.h" | 19 #include "components/ntp_snippets/content_suggestion.h" |
20 #include "components/ntp_snippets/content_suggestions_provider.h" | 20 #include "components/ntp_snippets/content_suggestions_provider.h" |
21 #include "components/offline_pages/offline_page_model.h" | 21 #include "components/offline_pages/offline_page_model.h" |
22 | 22 |
23 class PrefRegistrySimple; | 23 class PrefRegistrySimple; |
24 class PrefService; | 24 class PrefService; |
25 | 25 |
26 namespace gfx { | |
27 class Image; | |
28 } // namespace gfx | |
29 | |
30 namespace ntp_snippets { | 26 namespace ntp_snippets { |
31 | 27 |
32 // Provides recent tabs content suggestions from the offline pages model | 28 // Provides recent tabs content suggestions from the offline pages model |
33 // obtaining the data through OfflinePageProxy. | 29 // obtaining the data through OfflinePageProxy. |
34 class RecentTabSuggestionsProvider | 30 class RecentTabSuggestionsProvider |
35 : public ContentSuggestionsProvider, | 31 : public ContentSuggestionsProvider, |
36 public offline_pages::OfflinePageModel::Observer { | 32 public offline_pages::OfflinePageModel::Observer { |
37 public: | 33 public: |
38 RecentTabSuggestionsProvider( | 34 RecentTabSuggestionsProvider( |
39 ContentSuggestionsProvider::Observer* observer, | 35 ContentSuggestionsProvider::Observer* observer, |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 PrefService* pref_service_; | 112 PrefService* pref_service_; |
117 | 113 |
118 base::WeakPtrFactory<RecentTabSuggestionsProvider> weak_ptr_factory_; | 114 base::WeakPtrFactory<RecentTabSuggestionsProvider> weak_ptr_factory_; |
119 | 115 |
120 DISALLOW_COPY_AND_ASSIGN(RecentTabSuggestionsProvider); | 116 DISALLOW_COPY_AND_ASSIGN(RecentTabSuggestionsProvider); |
121 }; | 117 }; |
122 | 118 |
123 } // namespace ntp_snippets | 119 } // namespace ntp_snippets |
124 | 120 |
125 #endif // COMPONENTS_NTP_SNIPPETS_OFFLINE_PAGES_RECENT_TAB_SUGGESTIONS_PROVIDER
_H_ | 121 #endif // COMPONENTS_NTP_SNIPPETS_OFFLINE_PAGES_RECENT_TAB_SUGGESTIONS_PROVIDER
_H_ |
OLD | NEW |