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

Side by Side Diff: public/platform/WebServiceWorkerProxy.h

Issue 682003003: Simplify WebServiceWorker{Registration}Proxy interfaces. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove Impl wrapper layer; extend to also cover WebServiceWorkerProxy Created 6 years, 1 month 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
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 #include "WebCommon.h"
9
10 namespace blink { 8 namespace blink {
11 9
12 class ServiceWorker; 10 // FIXME: move to public/web/ ?
sof 2014/10/29 06:49:38 Removed this addition. Not a correct place for it,
13 11
14 // A proxy interface, passed via WebServiceWorker.setProxy() from blink to 12 // A proxy interface, passed via WebServiceWorker.setProxy() from blink to
15 // the embedder, to talk to the ServiceWorker object from embedder. 13 // the embedder, to talk to the ServiceWorker object from embedder.
16 class WebServiceWorkerProxy { 14 class WebServiceWorkerProxy {
17 public: 15 public:
18 WebServiceWorkerProxy() : m_private(0) { }
19 virtual ~WebServiceWorkerProxy() { }
20
21 // Returns true if the proxy is ready to be notified of service worker state 16 // Returns true if the proxy is ready to be notified of service worker state
22 // changes. It may not be if it's waiting for the registration promise to 17 // changes. It may not be if it's waiting for the registration promise to
23 // resolve, while the browser side has registered and is proceeding to 18 // resolve, while the browser side has registered and is proceeding to
24 // install and activate the worker. 19 // install and activate the worker.
25 virtual bool isReady() = 0; 20 virtual bool isReady() = 0;
26 21
27 // Notifies the proxy that the service worker state changed. The new state 22 // Notifies the proxy that the service worker state changed. The new state
28 // should be accessible via WebServiceWorker.state(). 23 // should be accessible via WebServiceWorker.state().
29 virtual void dispatchStateChangeEvent() = 0; 24 virtual void dispatchStateChangeEvent() = 0;
30 25
31 #if INSIDE_BLINK
32 BLINK_PLATFORM_EXPORT WebServiceWorkerProxy(ServiceWorker*);
33 BLINK_PLATFORM_EXPORT ServiceWorker* unwrap() const;
34 #endif
35
36 protected: 26 protected:
37 ServiceWorker* m_private; 27 virtual ~WebServiceWorkerProxy() { }
38 }; 28 };
39 29
40 } // namespace blink 30 } // namespace blink
41 31
42 #endif // WebServiceWorkerProxy_h 32 #endif // WebServiceWorkerProxy_h
OLDNEW
« no previous file with comments | « Source/platform/exported/WebServiceWorkerRegistrationProxy.cpp ('k') | public/platform/WebServiceWorkerRegistrationProxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698