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

Side by Side 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: yhirano comments 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WebServiceWorkerProxy_h 5 #ifndef WebServiceWorkerProxy_h
6 #define WebServiceWorkerProxy_h 6 #define WebServiceWorkerProxy_h
7 7
8 namespace blink { 8 namespace blink {
9 9
10 // A proxy interface, passed via WebServiceWorker.setProxy() from blink to 10 // A proxy interface, passed via WebServiceWorker.setProxy() from blink to
11 // the embedder, to talk to the ServiceWorker object from embedder. 11 // the embedder, to talk to the ServiceWorker object from embedder.
12 class WebServiceWorkerProxy { 12 class WebServiceWorkerProxy {
13 public: 13 public:
14 // The new state should be accessible via WebServiceWorker.state(). 14 // Informs the proxy that the service worker's state changed. The state
15 // should be accessible via WebServiceWorker.state() but may not necessarily
16 // be immediately reflected. For example, this happens if the proxy is
17 // waiting for the registration promise to resolve, while the browser has
18 // already registered and activated the worker.
19 virtual void onStateChanged(WebServiceWorkerState) = 0;
20
21 // FIXME: To be removed, this is just here as part of a three-sided patch.
15 virtual void dispatchStateChangeEvent() = 0; 22 virtual void dispatchStateChangeEvent() = 0;
16 }; 23 };
17 24
18 } // namespace blink 25 } // namespace blink
19 26
20 #endif // WebServiceWorkerProxy_h 27 #endif // WebServiceWorkerProxy_h
OLDNEW
« public/platform/WebServiceWorker.h ('K') | « public/platform/WebServiceWorker.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698