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

Unified Diff: public/platform/WebServiceWorkerProxy.h

Issue 247263010: ServiceWorker: Wait for registration promise to resolve before changing states. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: cleanup test Created 6 years, 8 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: public/platform/WebServiceWorkerProxy.h
diff --git a/public/platform/WebServiceWorkerProxy.h b/public/platform/WebServiceWorkerProxy.h
index 5cdeb30fef1940189dd753c4147e40b21d997a74..cdbeda50c2b426d09b15ca828e617a60f2c5681a 100644
--- a/public/platform/WebServiceWorkerProxy.h
+++ b/public/platform/WebServiceWorkerProxy.h
@@ -11,7 +11,14 @@ namespace blink {
// the embedder, to talk to the ServiceWorker object from embedder.
class WebServiceWorkerProxy {
public:
- // The new state should be accessible via WebServiceWorker.state().
+ // Informs the proxy that the service worker's state changed. The state
+ // should be accessible via WebServiceWorker.state() but may not necessarily
+ // be immediately reflected. For example, this happens if the proxy is
+ // waiting for the registration promise to resolve, while the browser has
+ // already registered and activated the worker.
+ virtual void onStateChanged(WebServiceWorkerState) = 0;
+
+ // FIXME(falken): Remove this after Chrome change rolls in.
kinuko 2014/04/23 14:20:00 nit: no ldap needed for FIXME in blink
falken 2014/04/24 00:58:50 Done.
virtual void dispatchStateChangeEvent() = 0;
};
« Source/modules/serviceworkers/ServiceWorker.cpp ('K') | « public/platform/WebServiceWorker.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698