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_PROVIDER_HOST_H_ | 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ |
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ | 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 void SetControllerVersionAttribute(ServiceWorkerVersion* version); | 131 void SetControllerVersionAttribute(ServiceWorkerVersion* version); |
132 | 132 |
133 // Clears all version fields. | 133 // Clears all version fields. |
134 void ClearVersionAttributes(); | 134 void ClearVersionAttributes(); |
135 | 135 |
136 // Creates a ServiceWorkerHandle to retain |version| and returns a | 136 // Creates a ServiceWorkerHandle to retain |version| and returns a |
137 // ServiceWorkerInfo with the handle ID to pass to the provider. The | 137 // ServiceWorkerInfo with the handle ID to pass to the provider. The |
138 // provider is responsible for releasing the handle. | 138 // provider is responsible for releasing the handle. |
139 ServiceWorkerObjectInfo CreateHandleAndPass(ServiceWorkerVersion* version); | 139 ServiceWorkerObjectInfo CreateHandleAndPass(ServiceWorkerVersion* version); |
140 | 140 |
| 141 // Creates a ServiceWorkerRegistrationHandle to retain |registration| and |
| 142 // returns the registration handle ID to pass to the provider. The provider is |
| 143 // responsible for releasing the handle. |
| 144 int CreateRegistrationHandleAndPass(ServiceWorkerRegistration* registration); |
| 145 |
141 const int process_id_; | 146 const int process_id_; |
142 const int provider_id_; | 147 const int provider_id_; |
143 GURL document_url_; | 148 GURL document_url_; |
144 | 149 |
145 scoped_refptr<ServiceWorkerRegistration> associated_registration_; | 150 scoped_refptr<ServiceWorkerRegistration> associated_registration_; |
146 | 151 |
147 scoped_refptr<ServiceWorkerVersion> controlling_version_; | 152 scoped_refptr<ServiceWorkerVersion> controlling_version_; |
148 scoped_refptr<ServiceWorkerVersion> active_version_; | 153 scoped_refptr<ServiceWorkerVersion> active_version_; |
149 scoped_refptr<ServiceWorkerVersion> waiting_version_; | 154 scoped_refptr<ServiceWorkerVersion> waiting_version_; |
150 scoped_refptr<ServiceWorkerVersion> installing_version_; | 155 scoped_refptr<ServiceWorkerVersion> installing_version_; |
151 scoped_refptr<ServiceWorkerVersion> running_hosted_version_; | 156 scoped_refptr<ServiceWorkerVersion> running_hosted_version_; |
152 base::WeakPtr<ServiceWorkerContextCore> context_; | 157 base::WeakPtr<ServiceWorkerContextCore> context_; |
153 ServiceWorkerDispatcherHost* dispatcher_host_; | 158 ServiceWorkerDispatcherHost* dispatcher_host_; |
154 | 159 |
155 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); | 160 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); |
156 }; | 161 }; |
157 | 162 |
158 } // namespace content | 163 } // namespace content |
159 | 164 |
160 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ | 165 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ |
OLD | NEW |