Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTRATION_H_ | 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTRATION_H_ |
| 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTRATION_H_ | 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTRATION_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 25 | 25 |
| 26 // Represents the core of a service worker registration object. Other | 26 // Represents the core of a service worker registration object. Other |
| 27 // registration derivatives (WebServiceWorkerRegistration etc) ultimately refer | 27 // registration derivatives (WebServiceWorkerRegistration etc) ultimately refer |
| 28 // to this class. This is refcounted via ServiceWorkerRegistrationHandle to | 28 // to this class. This is refcounted via ServiceWorkerRegistrationHandle to |
| 29 // facilitate multiple controllees being associated with the same registration. | 29 // facilitate multiple controllees being associated with the same registration. |
| 30 class CONTENT_EXPORT ServiceWorkerRegistration | 30 class CONTENT_EXPORT ServiceWorkerRegistration |
| 31 : NON_EXPORTED_BASE(public base::RefCounted<ServiceWorkerRegistration>), | 31 : NON_EXPORTED_BASE(public base::RefCounted<ServiceWorkerRegistration>), |
| 32 public ServiceWorkerVersion::Listener { | 32 public ServiceWorkerVersion::Listener { |
| 33 public: | 33 public: |
| 34 typedef base::Callback<void(ServiceWorkerStatusCode status)> StatusCallback; | 34 typedef base::Callback<void(ServiceWorkerStatusCode status)> StatusCallback; |
| 35 typedef base::Callback<void( | |
| 36 const std::string& data, | |
| 37 ServiceWorkerStatusCode status)> GetUserDataCallback; | |
|
michaeln
2016/05/03 19:38:06
thnx
johnme
2016/05/05 10:54:04
Acknowledged.
| |
| 38 | 35 |
| 39 class Listener { | 36 class Listener { |
| 40 public: | 37 public: |
| 41 virtual void OnVersionAttributesChanged( | 38 virtual void OnVersionAttributesChanged( |
| 42 ServiceWorkerRegistration* registration, | 39 ServiceWorkerRegistration* registration, |
| 43 ChangedVersionAttributesMask changed_mask, | 40 ChangedVersionAttributesMask changed_mask, |
| 44 const ServiceWorkerRegistrationInfo& info) {} | 41 const ServiceWorkerRegistrationInfo& info) {} |
| 45 virtual void OnRegistrationFailed( | 42 virtual void OnRegistrationFailed( |
| 46 ServiceWorkerRegistration* registration) {} | 43 ServiceWorkerRegistration* registration) {} |
| 47 virtual void OnRegistrationFinishedUninstalling( | 44 virtual void OnRegistrationFinishedUninstalling( |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 187 base::ObserverList<Listener> listeners_; | 184 base::ObserverList<Listener> listeners_; |
| 188 std::vector<base::Closure> registration_finished_callbacks_; | 185 std::vector<base::Closure> registration_finished_callbacks_; |
| 189 base::WeakPtr<ServiceWorkerContextCore> context_; | 186 base::WeakPtr<ServiceWorkerContextCore> context_; |
| 190 | 187 |
| 191 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerRegistration); | 188 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerRegistration); |
| 192 }; | 189 }; |
| 193 | 190 |
| 194 } // namespace content | 191 } // namespace content |
| 195 | 192 |
| 196 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTRATION_H_ | 193 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTRATION_H_ |
| OLD | NEW |