| 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 <string> | 10 #include <string> |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 } | 79 } |
| 80 | 80 |
| 81 ServiceWorkerVersion* waiting_version() const { | 81 ServiceWorkerVersion* waiting_version() const { |
| 82 return waiting_version_.get(); | 82 return waiting_version_.get(); |
| 83 } | 83 } |
| 84 | 84 |
| 85 ServiceWorkerVersion* installing_version() const { | 85 ServiceWorkerVersion* installing_version() const { |
| 86 return installing_version_.get(); | 86 return installing_version_.get(); |
| 87 } | 87 } |
| 88 | 88 |
| 89 bool has_installed_version() const { |
| 90 return active_version() || waiting_version(); |
| 91 } |
| 92 |
| 89 ServiceWorkerVersion* GetNewestVersion() const; | 93 ServiceWorkerVersion* GetNewestVersion() const; |
| 90 | 94 |
| 91 void AddListener(Listener* listener); | 95 void AddListener(Listener* listener); |
| 92 void RemoveListener(Listener* listener); | 96 void RemoveListener(Listener* listener); |
| 93 void NotifyRegistrationFailed(); | 97 void NotifyRegistrationFailed(); |
| 94 void NotifyUpdateFound(); | 98 void NotifyUpdateFound(); |
| 95 void NotifyVersionAttributesChanged(ChangedVersionAttributesMask mask); | 99 void NotifyVersionAttributesChanged(ChangedVersionAttributesMask mask); |
| 96 | 100 |
| 97 ServiceWorkerRegistrationInfo GetInfo(); | 101 ServiceWorkerRegistrationInfo GetInfo(); |
| 98 | 102 |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 base::ObserverList<Listener> listeners_; | 193 base::ObserverList<Listener> listeners_; |
| 190 std::vector<base::Closure> registration_finished_callbacks_; | 194 std::vector<base::Closure> registration_finished_callbacks_; |
| 191 base::WeakPtr<ServiceWorkerContextCore> context_; | 195 base::WeakPtr<ServiceWorkerContextCore> context_; |
| 192 | 196 |
| 193 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerRegistration); | 197 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerRegistration); |
| 194 }; | 198 }; |
| 195 | 199 |
| 196 } // namespace content | 200 } // namespace content |
| 197 | 201 |
| 198 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTRATION_H_ | 202 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTRATION_H_ |
| OLD | NEW |