| 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 17 matching lines...) Expand all Loading... |
| 28 // Represents the core of a service worker registration object. Other | 28 // Represents the core of a service worker registration object. Other |
| 29 // registration derivatives (WebServiceWorkerRegistration etc) ultimately refer | 29 // registration derivatives (WebServiceWorkerRegistration etc) ultimately refer |
| 30 // to this class. This is refcounted via ServiceWorkerRegistrationHandle to | 30 // to this class. This is refcounted via ServiceWorkerRegistrationHandle to |
| 31 // facilitate multiple controllees being associated with the same registration. | 31 // facilitate multiple controllees being associated with the same registration. |
| 32 class CONTENT_EXPORT ServiceWorkerRegistration | 32 class CONTENT_EXPORT ServiceWorkerRegistration |
| 33 : public NON_EXPORTED_BASE(base::RefCounted<ServiceWorkerRegistration>), | 33 : public NON_EXPORTED_BASE(base::RefCounted<ServiceWorkerRegistration>), |
| 34 public NON_EXPORTED_BASE(ServiceWorkerVersion::Listener) { | 34 public NON_EXPORTED_BASE(ServiceWorkerVersion::Listener) { |
| 35 public: | 35 public: |
| 36 typedef base::Callback<void(ServiceWorkerStatusCode status)> StatusCallback; | 36 typedef base::Callback<void(ServiceWorkerStatusCode status)> StatusCallback; |
| 37 | 37 |
| 38 class CONTENT_EXPORT Listener { | 38 class Listener { |
| 39 public: | 39 public: |
| 40 virtual void OnVersionAttributesChanged( | 40 virtual void OnVersionAttributesChanged( |
| 41 ServiceWorkerRegistration* registration, | 41 ServiceWorkerRegistration* registration, |
| 42 ChangedVersionAttributesMask changed_mask, | 42 ChangedVersionAttributesMask changed_mask, |
| 43 const ServiceWorkerRegistrationInfo& info) {} | 43 const ServiceWorkerRegistrationInfo& info) {} |
| 44 virtual void OnRegistrationFailed( | 44 virtual void OnRegistrationFailed( |
| 45 ServiceWorkerRegistration* registration) {} | 45 ServiceWorkerRegistration* registration) {} |
| 46 virtual void OnRegistrationFinishedUninstalling( | 46 virtual void OnRegistrationFinishedUninstalling( |
| 47 ServiceWorkerRegistration* registration) {} | 47 ServiceWorkerRegistration* registration) {} |
| 48 virtual void OnUpdateFound( | 48 virtual void OnUpdateFound( |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 std::vector<base::Closure> registration_finished_callbacks_; | 213 std::vector<base::Closure> registration_finished_callbacks_; |
| 214 base::WeakPtr<ServiceWorkerContextCore> context_; | 214 base::WeakPtr<ServiceWorkerContextCore> context_; |
| 215 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 215 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
| 216 | 216 |
| 217 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerRegistration); | 217 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerRegistration); |
| 218 }; | 218 }; |
| 219 | 219 |
| 220 } // namespace content | 220 } // namespace content |
| 221 | 221 |
| 222 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTRATION_H_ | 222 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTRATION_H_ |
| OLD | NEW |