OLD | NEW |
---|---|
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(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.
| |
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 |
OLD | NEW |