Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(306)

Unified Diff: content/child/service_worker/service_worker_provider_context.h

Issue 309503014: Make ServiceWorkerDispatcher reuse existing WebServiceWorkerImpls. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Correct comment. Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 23b1114f9595ac22dfef8da373e4561c9c3568aa..47a300325096d4240f485a0c44635219fd4215ab 100644
--- a/content/child/service_worker/service_worker_provider_context.h
+++ b/content/child/service_worker/service_worker_provider_context.h
@@ -37,9 +37,6 @@ class ServiceWorkerProviderContext
public:
explicit ServiceWorkerProviderContext(int provider_id);
- // Returns a new handle reference for .current.
- scoped_ptr<ServiceWorkerHandleReference> GetCurrentServiceWorkerHandle();
-
// Called from ServiceWorkerDispatcher.
void OnServiceWorkerStateChanged(int handle_id,
blink::WebServiceWorkerState state);
@@ -47,6 +44,14 @@ class ServiceWorkerProviderContext
const ServiceWorkerObjectInfo& info);
int provider_id() const { return provider_id_; }
+
+ // Gets the context's handle reference for .controller.
+ // TODO(dominicc): Rename this to "controller".
+ ServiceWorkerHandleReference* current();
+
+ // Gets the handle ID of the controller, or
+ // kInvalidServiceWorkerHandleId if the provider is not controlled
+ // by a Service Worker.
int current_handle_id() const;
private:

Powered by Google App Engine
This is Rietveld 408576698