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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 // registation, the method will reset that field to NULL, and notify | 102 // registation, the method will reset that field to NULL, and notify |
103 // listeners via OnVersionAttributesChanged. | 103 // listeners via OnVersionAttributesChanged. |
104 void UnsetVersion(ServiceWorkerVersion* version); | 104 void UnsetVersion(ServiceWorkerVersion* version); |
105 | 105 |
106 // Triggers the [[Activate]] algorithm when the currently active version | 106 // Triggers the [[Activate]] algorithm when the currently active version |
107 // has no controllees. If there are no controllees at the time the method | 107 // has no controllees. If there are no controllees at the time the method |
108 // is called or when version's skip waiting flag is set, activation is | 108 // is called or when version's skip waiting flag is set, activation is |
109 // initiated immediately. | 109 // initiated immediately. |
110 void ActivateWaitingVersionWhenReady(); | 110 void ActivateWaitingVersionWhenReady(); |
111 | 111 |
| 112 // Takes over control of provider hosts which are currently not controlled or |
| 113 // controlled by other registrations. |
| 114 void ClaimClients(); |
| 115 |
112 // Triggers the [[ClearRegistration]] algorithm when the currently | 116 // Triggers the [[ClearRegistration]] algorithm when the currently |
113 // active version has no controllees. Deletes this registration | 117 // active version has no controllees. Deletes this registration |
114 // from storage immediately. | 118 // from storage immediately. |
115 void ClearWhenReady(); | 119 void ClearWhenReady(); |
116 | 120 |
117 // Restores this registration in storage and cancels the pending | 121 // Restores this registration in storage and cancels the pending |
118 // [[ClearRegistration]] algorithm. | 122 // [[ClearRegistration]] algorithm. |
119 void AbortPendingClear(const StatusCallback& callback); | 123 void AbortPendingClear(const StatusCallback& callback); |
120 | 124 |
121 // The time of the most recent update check. | 125 // The time of the most recent update check. |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 scoped_refptr<ServiceWorkerVersion> installing_version_; | 180 scoped_refptr<ServiceWorkerVersion> installing_version_; |
177 ObserverList<Listener> listeners_; | 181 ObserverList<Listener> listeners_; |
178 base::WeakPtr<ServiceWorkerContextCore> context_; | 182 base::WeakPtr<ServiceWorkerContextCore> context_; |
179 | 183 |
180 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerRegistration); | 184 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerRegistration); |
181 }; | 185 }; |
182 | 186 |
183 } // namespace content | 187 } // namespace content |
184 | 188 |
185 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTRATION_H_ | 189 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTRATION_H_ |
OLD | NEW |