| 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_SESSIONS_FOREIGN_SESSIONS_SUGGESTIONS_PROVIDER_H
_ | 5 #ifndef COMPONENTS_NTP_SNIPPETS_SESSIONS_FOREIGN_SESSIONS_SUGGESTIONS_PROVIDER_H
_ |
| 6 #define COMPONENTS_NTP_SNIPPETS_SESSIONS_FOREIGN_SESSIONS_SUGGESTIONS_PROVIDER_H
_ | 6 #define COMPONENTS_NTP_SNIPPETS_SESSIONS_FOREIGN_SESSIONS_SUGGESTIONS_PROVIDER_H
_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 // Should only be called at most once. | 33 // Should only be called at most once. |
| 34 virtual void SubscribeForForeignTabChange( | 34 virtual void SubscribeForForeignTabChange( |
| 35 const base::Closure& change_callback) = 0; | 35 const base::Closure& change_callback) = 0; |
| 36 }; | 36 }; |
| 37 | 37 |
| 38 // Provides content suggestions from foreign sessions. | 38 // Provides content suggestions from foreign sessions. |
| 39 class ForeignSessionsSuggestionsProvider : public ContentSuggestionsProvider { | 39 class ForeignSessionsSuggestionsProvider : public ContentSuggestionsProvider { |
| 40 public: | 40 public: |
| 41 ForeignSessionsSuggestionsProvider( | 41 ForeignSessionsSuggestionsProvider( |
| 42 ContentSuggestionsProvider::Observer* observer, | 42 ContentSuggestionsProvider::Observer* observer, |
| 43 CategoryFactory* category_factory, | |
| 44 std::unique_ptr<ForeignSessionsProvider> foreign_sessions_provider, | 43 std::unique_ptr<ForeignSessionsProvider> foreign_sessions_provider, |
| 45 PrefService* pref_service); | 44 PrefService* pref_service); |
| 46 ~ForeignSessionsSuggestionsProvider() override; | 45 ~ForeignSessionsSuggestionsProvider() override; |
| 47 | 46 |
| 48 static void RegisterProfilePrefs(PrefRegistrySimple* registry); | 47 static void RegisterProfilePrefs(PrefRegistrySimple* registry); |
| 49 | 48 |
| 50 private: | 49 private: |
| 51 friend class ForeignSessionsSuggestionsProviderTest; | 50 friend class ForeignSessionsSuggestionsProviderTest; |
| 52 struct SessionData; | 51 struct SessionData; |
| 53 | 52 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 80 const Category provided_category_; | 79 const Category provided_category_; |
| 81 std::unique_ptr<ForeignSessionsProvider> foreign_sessions_provider_; | 80 std::unique_ptr<ForeignSessionsProvider> foreign_sessions_provider_; |
| 82 PrefService* pref_service_; | 81 PrefService* pref_service_; |
| 83 | 82 |
| 84 DISALLOW_COPY_AND_ASSIGN(ForeignSessionsSuggestionsProvider); | 83 DISALLOW_COPY_AND_ASSIGN(ForeignSessionsSuggestionsProvider); |
| 85 }; | 84 }; |
| 86 | 85 |
| 87 } // namespace ntp_snippets | 86 } // namespace ntp_snippets |
| 88 | 87 |
| 89 #endif // COMPONENTS_NTP_SNIPPETS_SESSIONS_FOREIGN_SESSIONS_SUGGESTIONS_PROVIDE
R_H_ | 88 #endif // COMPONENTS_NTP_SNIPPETS_SESSIONS_FOREIGN_SESSIONS_SUGGESTIONS_PROVIDE
R_H_ |
| OLD | NEW |