| 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 { | 98 const NavigationPreloadState& navigation_preload_state() const { |
| 99 return navigation_preload_state_.enabled; | 99 return navigation_preload_state_; |
| 100 } | |
| 101 | |
| 102 const std::string& navigation_preload_header() const { | |
| 103 return navigation_preload_state_.header; | |
| 104 } | 100 } |
| 105 | 101 |
| 106 ServiceWorkerVersion* GetNewestVersion() const; | 102 ServiceWorkerVersion* GetNewestVersion() const; |
| 107 | 103 |
| 108 void AddListener(Listener* listener); | 104 void AddListener(Listener* listener); |
| 109 void RemoveListener(Listener* listener); | 105 void RemoveListener(Listener* listener); |
| 110 void NotifyRegistrationFailed(); | 106 void NotifyRegistrationFailed(); |
| 111 void NotifyUpdateFound(); | 107 void NotifyUpdateFound(); |
| 112 void NotifyVersionAttributesChanged(ChangedVersionAttributesMask mask); | 108 void NotifyVersionAttributesChanged(ChangedVersionAttributesMask mask); |
| 113 | 109 |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 std::vector<base::Closure> registration_finished_callbacks_; | 212 std::vector<base::Closure> registration_finished_callbacks_; |
| 217 base::WeakPtr<ServiceWorkerContextCore> context_; | 213 base::WeakPtr<ServiceWorkerContextCore> context_; |
| 218 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 214 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
| 219 | 215 |
| 220 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerRegistration); | 216 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerRegistration); |
| 221 }; | 217 }; |
| 222 | 218 |
| 223 } // namespace content | 219 } // namespace content |
| 224 | 220 |
| 225 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTRATION_H_ | 221 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTRATION_H_ |
| OLD | NEW |