Index: content/child/service_worker/service_worker_provider_context.h |
diff --git a/content/child/service_worker/service_worker_provider_context.h b/content/child/service_worker/service_worker_provider_context.h |
index ee294d99293a7297c9df4da71a058b32c8587b52..48fd59b2118b05bd36ec5aa868fa81ae96cf8296 100644 |
--- a/content/child/service_worker/service_worker_provider_context.h |
+++ b/content/child/service_worker/service_worker_provider_context.h |
@@ -24,6 +24,7 @@ class Message; |
namespace content { |
class ServiceWorkerHandleReference; |
+class ServiceWorkerRegistrationHandleReference; |
struct ServiceWorkerProviderContextDeleter; |
class ThreadSafeSender; |
@@ -49,6 +50,9 @@ class ServiceWorkerProviderContext |
void OnSetControllerServiceWorker(int provider_id, |
const ServiceWorkerObjectInfo& info); |
+ void AssociateRegistration(const ServiceWorkerRegistrationObjectInfo& info); |
+ void UnassociateRegistration(); |
+ |
int provider_id() const { return provider_id_; } |
ServiceWorkerHandleReference* installing(); |
@@ -56,6 +60,8 @@ class ServiceWorkerProviderContext |
ServiceWorkerHandleReference* active(); |
ServiceWorkerHandleReference* controller(); |
+ ServiceWorkerRegistrationHandleReference* registration(); |
+ |
// Gets the handle ID of the installing Service Worker, or |
// kInvalidServiceWorkerHandleId if the provider does not have a |
// installing Service Worker. |
@@ -76,6 +82,11 @@ class ServiceWorkerProviderContext |
// by a Service Worker. |
int controller_handle_id() const; |
+ // Gets the handle ID of the associated registration, or |
+ // kInvalidRegistrationHandleId if the provider does not have a ready |
+ // Service Worker registration. |
+ int registration_handle_id() const; |
+ |
private: |
friend class base::RefCounted<ServiceWorkerProviderContext>; |
~ServiceWorkerProviderContext(); |
@@ -88,6 +99,8 @@ class ServiceWorkerProviderContext |
scoped_ptr<ServiceWorkerHandleReference> active_; |
scoped_ptr<ServiceWorkerHandleReference> controller_; |
+ scoped_ptr<ServiceWorkerRegistrationHandleReference> registration_; |
+ |
DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderContext); |
}; |