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 WebServiceWorkerRegistrationProxy_h | 5 #ifndef WebServiceWorkerRegistrationProxy_h |
6 #define WebServiceWorkerRegistrationProxy_h | 6 #define WebServiceWorkerRegistrationProxy_h |
7 | 7 |
8 #include "WebCommon.h" | |
tkent
2014/08/14 05:33:15
should be "public/platform/WebCommon.h"
nhiroki
2014/08/14 06:15:19
Done.
| |
9 | |
8 namespace blink { | 10 namespace blink { |
9 | 11 |
12 class ServiceWorkerRegistration; | |
10 class WebServiceWorker; | 13 class WebServiceWorker; |
11 | 14 |
12 // A proxy interface, passed via WebServiceWorkerRegistration.setProxy() from | 15 // A proxy interface, passed via WebServiceWorkerRegistration.setProxy() from |
13 // blink to the embedder, to talk to the ServiceWorkerRegistration object from | 16 // blink to the embedder, to talk to the ServiceWorkerRegistration object from |
14 // embedder. | 17 // embedder. |
15 class WebServiceWorkerRegistrationProxy { | 18 class WebServiceWorkerRegistrationProxy { |
16 public: | 19 public: |
17 WebServiceWorkerRegistrationProxy() { } | 20 WebServiceWorkerRegistrationProxy() : m_private(0) { } |
18 virtual ~WebServiceWorkerRegistrationProxy() { } | 21 virtual ~WebServiceWorkerRegistrationProxy() { } |
19 | 22 |
20 // Notifies that the registration entered the installation process. | 23 // Notifies that the registration entered the installation process. |
21 // The installing worker should be accessible via | 24 // The installing worker should be accessible via |
22 // WebServiceWorkerRegistration.installing. | 25 // WebServiceWorkerRegistration.installing. |
23 virtual void dispatchUpdateFoundEvent() = 0; | 26 virtual void dispatchUpdateFoundEvent() = 0; |
24 | 27 |
25 virtual void setInstalling(WebServiceWorker*) = 0; | 28 virtual void setInstalling(WebServiceWorker*) = 0; |
26 virtual void setWaiting(WebServiceWorker*) = 0; | 29 virtual void setWaiting(WebServiceWorker*) = 0; |
27 virtual void setActive(WebServiceWorker*) = 0; | 30 virtual void setActive(WebServiceWorker*) = 0; |
31 | |
32 #if INSIDE_BLINK | |
33 BLINK_PLATFORM_EXPORT WebServiceWorkerRegistrationProxy(ServiceWorkerRegistr ation*); | |
34 BLINK_PLATFORM_EXPORT ServiceWorkerRegistration* unwrap() const; | |
tkent
2014/08/14 05:33:15
We usually define |operator ServiceWorkerRegistrat
nhiroki
2014/08/14 06:15:19
Done.
| |
35 #endif | |
36 | |
37 protected: | |
38 ServiceWorkerRegistration* m_private; | |
28 }; | 39 }; |
29 | 40 |
30 } // namespace blink | 41 } // namespace blink |
31 | 42 |
32 #endif // WebServiceWorkerRegistrationProxy_h | 43 #endif // WebServiceWorkerRegistrationProxy_h |
OLD | NEW |