| 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 <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 ServiceWorkerStatusCode status)> GetUserDataCallback; | 35 ServiceWorkerStatusCode status)> GetUserDataCallback; |
| 36 | 36 |
| 37 class Listener { | 37 class Listener { |
| 38 public: | 38 public: |
| 39 virtual void OnVersionAttributesChanged( | 39 virtual void OnVersionAttributesChanged( |
| 40 ServiceWorkerRegistration* registration, | 40 ServiceWorkerRegistration* registration, |
| 41 ChangedVersionAttributesMask changed_mask, | 41 ChangedVersionAttributesMask changed_mask, |
| 42 const ServiceWorkerRegistrationInfo& info) {} | 42 const ServiceWorkerRegistrationInfo& info) {} |
| 43 virtual void OnRegistrationFailed( | 43 virtual void OnRegistrationFailed( |
| 44 ServiceWorkerRegistration* registration) {} | 44 ServiceWorkerRegistration* registration) {} |
| 45 virtual void OnRegistrationFinishedUninstalling( |
| 46 ServiceWorkerRegistration* registration) {} |
| 45 virtual void OnUpdateFound( | 47 virtual void OnUpdateFound( |
| 46 ServiceWorkerRegistration* registration) {} | 48 ServiceWorkerRegistration* registration) {} |
| 47 virtual void OnSkippedWaiting(ServiceWorkerRegistration* registation) {} | 49 virtual void OnSkippedWaiting(ServiceWorkerRegistration* registation) {} |
| 48 }; | 50 }; |
| 49 | 51 |
| 50 ServiceWorkerRegistration(const GURL& pattern, | 52 ServiceWorkerRegistration(const GURL& pattern, |
| 51 int64 registration_id, | 53 int64 registration_id, |
| 52 base::WeakPtr<ServiceWorkerContextCore> context); | 54 base::WeakPtr<ServiceWorkerContextCore> context); |
| 53 | 55 |
| 54 int64 id() const { return registration_id_; } | 56 int64 id() const { return registration_id_; } |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 scoped_refptr<ServiceWorkerVersion> installing_version_; | 188 scoped_refptr<ServiceWorkerVersion> installing_version_; |
| 187 ObserverList<Listener> listeners_; | 189 ObserverList<Listener> listeners_; |
| 188 base::WeakPtr<ServiceWorkerContextCore> context_; | 190 base::WeakPtr<ServiceWorkerContextCore> context_; |
| 189 | 191 |
| 190 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerRegistration); | 192 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerRegistration); |
| 191 }; | 193 }; |
| 192 | 194 |
| 193 } // namespace content | 195 } // namespace content |
| 194 | 196 |
| 195 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTRATION_H_ | 197 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTRATION_H_ |
| OLD | NEW |