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

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

Issue 369013002: ServiceWorker: Support navigator.serviceWorker.installing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 12e6a2dd5291d280eb0054db37ea6cb997aa2e91..672bd7c9a727195e2fbbf5967011b82d26e89b11 100644
--- a/content/child/service_worker/service_worker_provider_context.h
+++ b/content/child/service_worker/service_worker_provider_context.h
@@ -40,6 +40,8 @@ class ServiceWorkerProviderContext
// Called from ServiceWorkerDispatcher.
void OnServiceWorkerStateChanged(int handle_id,
blink::WebServiceWorkerState state);
+ void OnSetInstallingServiceWorker(int provider_id,
+ const ServiceWorkerObjectInfo& info);
void OnSetWaitingServiceWorker(int provider_id,
const ServiceWorkerObjectInfo& info);
void OnSetControllerServiceWorker(int provider_id,
@@ -47,9 +49,15 @@ class ServiceWorkerProviderContext
int provider_id() const { return provider_id_; }
+ ServiceWorkerHandleReference* installing();
ServiceWorkerHandleReference* waiting();
ServiceWorkerHandleReference* controller();
+ // Gets the handle ID of the installing Service Worker, or
+ // kInvalidServiceWorkerHandleId if the provider does not have a
+ // installing Service Worker.
+ int installing_handle_id() const;
+
// Gets the handle ID of the waiting Service Worker, or
// kInvalidServiceWorkerHandleId if the provider does not have a
// waiting Service Worker.
@@ -67,6 +75,7 @@ class ServiceWorkerProviderContext
const int provider_id_;
scoped_refptr<base::MessageLoopProxy> main_thread_loop_proxy_;
scoped_refptr<ThreadSafeSender> thread_safe_sender_;
+ scoped_ptr<ServiceWorkerHandleReference> installing_;
scoped_ptr<ServiceWorkerHandleReference> waiting_;
scoped_ptr<ServiceWorkerHandleReference> controller_;

Powered by Google App Engine
This is Rietveld 408576698