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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 friend class base::RefCounted<ServiceWorkerRegistration>; | 154 friend class base::RefCounted<ServiceWorkerRegistration>; |
155 | 155 |
156 ~ServiceWorkerRegistration() override; | 156 ~ServiceWorkerRegistration() override; |
157 | 157 |
158 void UnsetVersionInternal( | 158 void UnsetVersionInternal( |
159 ServiceWorkerVersion* version, | 159 ServiceWorkerVersion* version, |
160 ChangedVersionAttributesMask* mask); | 160 ChangedVersionAttributesMask* mask); |
161 | 161 |
162 // ServiceWorkerVersion::Listener override. | 162 // ServiceWorkerVersion::Listener override. |
163 void OnNoControllees(ServiceWorkerVersion* version) override; | 163 void OnNoControllees(ServiceWorkerVersion* version) override; |
| 164 void OnNoInflightRequests(ServiceWorkerVersion* version) override; |
| 165 |
| 166 bool IsReadyToActivate() const; |
164 | 167 |
165 // Promotes the waiting version to active version. If |delay| is true, waits | 168 // Promotes the waiting version to active version. If |delay| is true, waits |
166 // a short time before attempting to start and dispatch the activate event | 169 // a short time before attempting to start and dispatch the activate event |
167 // to the version. | 170 // to the version. |
168 void ActivateWaitingVersion(bool delay); | 171 void ActivateWaitingVersion(bool delay); |
169 void ContinueActivation( | 172 void ContinueActivation( |
170 scoped_refptr<ServiceWorkerVersion> activating_version); | 173 scoped_refptr<ServiceWorkerVersion> activating_version); |
171 void DispatchActivateEvent( | 174 void DispatchActivateEvent( |
172 scoped_refptr<ServiceWorkerVersion> activating_version); | 175 scoped_refptr<ServiceWorkerVersion> activating_version); |
173 void OnActivateEventFinished( | 176 void OnActivateEventFinished( |
(...skipping 27 matching lines...) Expand all Loading... |
201 std::vector<base::Closure> registration_finished_callbacks_; | 204 std::vector<base::Closure> registration_finished_callbacks_; |
202 base::WeakPtr<ServiceWorkerContextCore> context_; | 205 base::WeakPtr<ServiceWorkerContextCore> context_; |
203 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 206 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
204 | 207 |
205 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerRegistration); | 208 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerRegistration); |
206 }; | 209 }; |
207 | 210 |
208 } // namespace content | 211 } // namespace content |
209 | 212 |
210 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTRATION_H_ | 213 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTRATION_H_ |
OLD | NEW |