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 <string> | 10 #include <string> |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 const ParseJSONCallback parse_json_callback_; | 171 const ParseJSONCallback parse_json_callback_; |
172 | 172 |
173 base::WeakPtrFactory<NTPSnippetsService> weak_ptr_factory_; | 173 base::WeakPtrFactory<NTPSnippetsService> weak_ptr_factory_; |
174 | 174 |
175 DISALLOW_COPY_AND_ASSIGN(NTPSnippetsService); | 175 DISALLOW_COPY_AND_ASSIGN(NTPSnippetsService); |
176 }; | 176 }; |
177 | 177 |
178 class NTPSnippetsServiceObserver { | 178 class NTPSnippetsServiceObserver { |
179 public: | 179 public: |
180 // Sent every time the service loads a new set of data. | 180 // Sent every time the service loads a new set of data. |
181 virtual void NTPSnippetsServiceLoaded(NTPSnippetsService* service) = 0; | 181 virtual void NTPSnippetsServiceLoaded() = 0; |
182 // Sent when the service is shutting down. | 182 // Sent when the service is shutting down. |
183 virtual void NTPSnippetsServiceShutdown(NTPSnippetsService* service) = 0; | 183 virtual void NTPSnippetsServiceShutdown() = 0; |
184 | 184 |
185 protected: | 185 protected: |
186 virtual ~NTPSnippetsServiceObserver() {} | 186 virtual ~NTPSnippetsServiceObserver() {} |
187 }; | 187 }; |
188 | 188 |
189 } // namespace ntp_snippets | 189 } // namespace ntp_snippets |
190 | 190 |
191 #endif // COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_ | 191 #endif // COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_ |
OLD | NEW |