| 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 } | 88 } |
| 89 | 89 |
| 90 ServiceWorkerVersion* installing_version() const { | 90 ServiceWorkerVersion* installing_version() const { |
| 91 return installing_version_.get(); | 91 return installing_version_.get(); |
| 92 } | 92 } |
| 93 | 93 |
| 94 bool has_installed_version() const { | 94 bool has_installed_version() const { |
| 95 return active_version() || waiting_version(); | 95 return active_version() || waiting_version(); |
| 96 } | 96 } |
| 97 | 97 |
| 98 bool is_navigation_preload_enabled() const { |
| 99 return is_navigation_preload_enabled_; |
| 100 } |
| 101 |
| 98 ServiceWorkerVersion* GetNewestVersion() const; | 102 ServiceWorkerVersion* GetNewestVersion() const; |
| 99 | 103 |
| 100 void AddListener(Listener* listener); | 104 void AddListener(Listener* listener); |
| 101 void RemoveListener(Listener* listener); | 105 void RemoveListener(Listener* listener); |
| 102 void NotifyRegistrationFailed(); | 106 void NotifyRegistrationFailed(); |
| 103 void NotifyUpdateFound(); | 107 void NotifyUpdateFound(); |
| 104 void NotifyVersionAttributesChanged(ChangedVersionAttributesMask mask); | 108 void NotifyVersionAttributesChanged(ChangedVersionAttributesMask mask); |
| 105 | 109 |
| 106 ServiceWorkerRegistrationInfo GetInfo(); | 110 ServiceWorkerRegistrationInfo GetInfo(); |
| 107 | 111 |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 std::vector<base::Closure> registration_finished_callbacks_; | 211 std::vector<base::Closure> registration_finished_callbacks_; |
| 208 base::WeakPtr<ServiceWorkerContextCore> context_; | 212 base::WeakPtr<ServiceWorkerContextCore> context_; |
| 209 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 213 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
| 210 | 214 |
| 211 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerRegistration); | 215 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerRegistration); |
| 212 }; | 216 }; |
| 213 | 217 |
| 214 } // namespace content | 218 } // namespace content |
| 215 | 219 |
| 216 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTRATION_H_ | 220 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTRATION_H_ |
| OLD | NEW |