Index: content/child/service_worker/service_worker_dispatcher.h |
diff --git a/content/child/service_worker/service_worker_dispatcher.h b/content/child/service_worker/service_worker_dispatcher.h |
index b596b37483ca571407e576ff3e8c75ebcbfd1062..7bd74d1bf0b2110c44a55bda44c355b7630ce2a4 100644 |
--- a/content/child/service_worker/service_worker_dispatcher.h |
+++ b/content/child/service_worker/service_worker_dispatcher.h |
@@ -70,6 +70,22 @@ class ServiceWorkerDispatcher : public WorkerTaskRunner::Observer { |
blink::WebServiceWorkerProviderClient* client); |
void RemoveScriptClient(int provider_id); |
+ // If an existing WebServiceWorkerImpl exists for the Service |
michaeln
2014/06/02 21:11:19
fyi: eventually, i think we'll have consumers of t
|
+ // Worker, it is returned; otherwise a WebServiceWorkerImpl is |
+ // created and its ownership is transferred caller. If |
falken
2014/06/02 05:40:11
transferred to the caller
|
+ // |adopt_handle| is true, a ServiceWorkerHandleReference will be |
+ // adopted for the specified Service Worker. |
+ // |
+ // TODO(dominicc): The lifetime of WebServiceWorkerImpl is too tricky; this |
michaeln
2014/06/02 21:11:19
how does the caller know when ownership is transfe
|
+ // method can return an existing WebServiceWorkerImpl, in which case |
+ // it is owned by a WebCore::ServiceWorker and the lifetime is not |
+ // being transferred to the owner; or it can create a |
+ // WebServiceWorkerImpl, in which case ownership is transferred to |
+ // the caller who must bounce it to a method that will associate it |
+ // with a WebCore::ServiceWorker. |
+ WebServiceWorkerImpl* GetServiceWorker(const ServiceWorkerObjectInfo&, |
+ bool adopt_handle); |
+ |
// |thread_safe_sender| needs to be passed in because if the call leads to |
// construction it will be needed. |
static ServiceWorkerDispatcher* GetOrCreateThreadSpecificInstance( |