| 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 private: | 134 private: |
| 135 friend class ServiceWorkerProviderHostTest; | 135 friend class ServiceWorkerProviderHostTest; |
| 136 friend class ServiceWorkerWriteToCacheJobTest; | 136 friend class ServiceWorkerWriteToCacheJobTest; |
| 137 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerContextRequestHandlerTest, | 137 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerContextRequestHandlerTest, |
| 138 UpdateBefore24Hours); | 138 UpdateBefore24Hours); |
| 139 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerContextRequestHandlerTest, | 139 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerContextRequestHandlerTest, |
| 140 UpdateAfter24Hours); | 140 UpdateAfter24Hours); |
| 141 | 141 |
| 142 // ServiceWorkerRegistration::Listener overrides. | 142 // ServiceWorkerRegistration::Listener overrides. |
| 143 void OnRegistrationFailed(ServiceWorkerRegistration* registration) override; | 143 void OnRegistrationFailed(ServiceWorkerRegistration* registration) override; |
| 144 void OnVersionAttributesChanged( |
| 145 ServiceWorkerRegistration* registration, |
| 146 ChangedVersionAttributesMask changed_mask, |
| 147 const ServiceWorkerRegistrationInfo& info) override; |
| 144 | 148 |
| 145 // Sets the controller version field to |version| or if |version| is NULL, | 149 // Sets the controller version field to |version| or if |version| is NULL, |
| 146 // clears the field. | 150 // clears the field. |
| 147 void SetControllerVersionAttribute(ServiceWorkerVersion* version); | 151 void SetControllerVersionAttribute(ServiceWorkerVersion* version); |
| 148 | 152 |
| 149 // Creates a ServiceWorkerHandle to retain |version| and returns a | 153 // Creates a ServiceWorkerHandle to retain |version| and returns a |
| 150 // ServiceWorkerInfo with the handle ID to pass to the provider. The | 154 // ServiceWorkerInfo with the handle ID to pass to the provider. The |
| 151 // provider is responsible for releasing the handle. | 155 // provider is responsible for releasing the handle. |
| 152 ServiceWorkerObjectInfo CreateHandleAndPass(ServiceWorkerVersion* version); | 156 ServiceWorkerObjectInfo CreateHandleAndPass(ServiceWorkerVersion* version); |
| 153 | 157 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 168 base::WeakPtr<ServiceWorkerContextCore> context_; | 172 base::WeakPtr<ServiceWorkerContextCore> context_; |
| 169 ServiceWorkerDispatcherHost* dispatcher_host_; | 173 ServiceWorkerDispatcherHost* dispatcher_host_; |
| 170 bool allow_association_; | 174 bool allow_association_; |
| 171 | 175 |
| 172 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); | 176 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); |
| 173 }; | 177 }; |
| 174 | 178 |
| 175 } // namespace content | 179 } // namespace content |
| 176 | 180 |
| 177 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ | 181 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ |
| OLD | NEW |