| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_CHILD_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_CONTEXT_H_ | 5 #ifndef CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_CONTEXT_H_ |
| 6 #define CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_CONTEXT_H_ | 6 #define CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_CONTEXT_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 void OnAssociateRegistration(const ServiceWorkerRegistrationObjectInfo& info, | 41 void OnAssociateRegistration(const ServiceWorkerRegistrationObjectInfo& info, |
| 42 const ServiceWorkerVersionAttributes& attrs); | 42 const ServiceWorkerVersionAttributes& attrs); |
| 43 void OnDisassociateRegistration(); | 43 void OnDisassociateRegistration(); |
| 44 void OnServiceWorkerStateChanged(int handle_id, | 44 void OnServiceWorkerStateChanged(int handle_id, |
| 45 blink::WebServiceWorkerState state); | 45 blink::WebServiceWorkerState state); |
| 46 void OnSetControllerServiceWorker(const ServiceWorkerObjectInfo& info); | 46 void OnSetControllerServiceWorker(const ServiceWorkerObjectInfo& info); |
| 47 | 47 |
| 48 int provider_id() const { return provider_id_; } | 48 int provider_id() const { return provider_id_; } |
| 49 | 49 |
| 50 ServiceWorkerHandleReference* controller(); | 50 ServiceWorkerHandleReference* controller(); |
| 51 ServiceWorkerRegistrationHandleReference* registration(); | |
| 52 | 51 |
| 53 ServiceWorkerVersionAttributes GetVersionAttributes(); | 52 bool IsAssociatedWithRegistration(); |
| 53 |
| 54 void GetRegistrationInfoAndVersionAttributes( |
| 55 ServiceWorkerRegistrationObjectInfo* info, |
| 56 ServiceWorkerVersionAttributes* attrs); |
| 54 void SetVersionAttributes(ChangedVersionAttributesMask mask, | 57 void SetVersionAttributes(ChangedVersionAttributesMask mask, |
| 55 const ServiceWorkerVersionAttributes& attrs); | 58 const ServiceWorkerVersionAttributes& attrs); |
| 56 | 59 |
| 57 // Gets the handle ID of the installing Service Worker, or | 60 // Gets the handle ID of the installing Service Worker, or |
| 58 // kInvalidServiceWorkerHandleId if the provider does not have a | 61 // kInvalidServiceWorkerHandleId if the provider does not have a |
| 59 // installing Service Worker. | 62 // installing Service Worker. |
| 60 int installing_handle_id() const; | 63 int installing_handle_id() const; |
| 61 | 64 |
| 62 // Gets the handle ID of the waiting Service Worker, or | 65 // Gets the handle ID of the waiting Service Worker, or |
| 63 // kInvalidServiceWorkerHandleId if the provider does not have a | 66 // kInvalidServiceWorkerHandleId if the provider does not have a |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 | 112 |
| 110 struct ServiceWorkerProviderContextDeleter { | 113 struct ServiceWorkerProviderContextDeleter { |
| 111 static void Destruct(const ServiceWorkerProviderContext* context) { | 114 static void Destruct(const ServiceWorkerProviderContext* context) { |
| 112 context->DestructOnMainThread(); | 115 context->DestructOnMainThread(); |
| 113 } | 116 } |
| 114 }; | 117 }; |
| 115 | 118 |
| 116 } // namespace content | 119 } // namespace content |
| 117 | 120 |
| 118 #endif // CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_CONTEXT_H_ | 121 #endif // CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_CONTEXT_H_ |
| OLD | NEW |