Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(921)

Side by Side Diff: components/ntp_snippets/ntp_snippets_service.h

Issue 1869023002: [NTP Snippets] SnippetsBridge: register as SnippetsObserver only when we get a Java observer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@snippets_service_cleanup
Patch Set: rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « chrome/browser/android/ntp/ntp_snippets_bridge.cc ('k') | components/ntp_snippets/ntp_snippets_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698