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 CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_REGISTRATION_IMPL_H_ | 5 #ifndef CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_REGISTRATION_IMPL_H_ |
6 #define CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_REGISTRATION_IMPL_H_ | 6 #define CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_REGISTRATION_IMPL_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "third_party/WebKit/public/platform/WebServiceWorkerRegistration.h" | 9 #include "third_party/WebKit/public/platform/WebServiceWorkerRegistration.h" |
10 | 10 |
11 namespace blink { | 11 namespace blink { |
12 class WebServiceWorker; | 12 class WebServiceWorker; |
13 class WebServiceWorkerRegistrationProxy; | 13 class WebServiceWorkerRegistrationProxy; |
14 } | 14 } |
15 | 15 |
16 namespace content { | 16 namespace content { |
17 | 17 |
18 class ServiceWorkerRegistrationHandleReference; | 18 class ServiceWorkerRegistrationHandleReference; |
19 class ThreadSafeSender; | 19 class ThreadSafeSender; |
20 struct ServiceWorkerObjectInfo; | 20 struct ServiceWorkerObjectInfo; |
21 | 21 |
22 class WebServiceWorkerRegistrationImpl | 22 class WebServiceWorkerRegistrationImpl |
23 : NON_EXPORTED_BASE(public blink::WebServiceWorkerRegistration) { | 23 : NON_EXPORTED_BASE(public blink::WebServiceWorkerRegistration) { |
24 public: | 24 public: |
25 explicit WebServiceWorkerRegistrationImpl( | 25 explicit WebServiceWorkerRegistrationImpl( |
26 scoped_ptr<ServiceWorkerRegistrationHandleReference> handle_ref); | 26 scoped_ptr<ServiceWorkerRegistrationHandleReference> handle_ref); |
27 virtual ~WebServiceWorkerRegistrationImpl(); | 27 virtual ~WebServiceWorkerRegistrationImpl(); |
28 | 28 |
| 29 void SetInstalling(blink::WebServiceWorker* service_worker); |
| 30 void SetWaiting(blink::WebServiceWorker* service_worker); |
| 31 void SetActive(blink::WebServiceWorker* service_worker); |
| 32 |
29 void OnUpdateFound(); | 33 void OnUpdateFound(); |
30 | 34 |
| 35 // blink::WebServiceWorkerRegistration overrides. |
31 virtual void setProxy(blink::WebServiceWorkerRegistrationProxy* proxy); | 36 virtual void setProxy(blink::WebServiceWorkerRegistrationProxy* proxy); |
32 virtual blink::WebServiceWorkerRegistrationProxy* proxy(); | 37 virtual blink::WebServiceWorkerRegistrationProxy* proxy(); |
33 virtual void setInstalling(blink::WebServiceWorker* service_worker); | |
34 virtual void setWaiting(blink::WebServiceWorker* service_worker); | |
35 virtual void setActive(blink::WebServiceWorker* service_worker); | |
36 | |
37 virtual blink::WebURL scope() const; | 38 virtual blink::WebURL scope() const; |
38 | 39 |
39 private: | 40 private: |
40 scoped_ptr<ServiceWorkerRegistrationHandleReference> handle_ref_; | 41 scoped_ptr<ServiceWorkerRegistrationHandleReference> handle_ref_; |
41 blink::WebServiceWorkerRegistrationProxy* proxy_; | 42 blink::WebServiceWorkerRegistrationProxy* proxy_; |
42 | 43 |
43 DISALLOW_COPY_AND_ASSIGN(WebServiceWorkerRegistrationImpl); | 44 DISALLOW_COPY_AND_ASSIGN(WebServiceWorkerRegistrationImpl); |
44 }; | 45 }; |
45 | 46 |
46 } // namespace content | 47 } // namespace content |
47 | 48 |
48 #endif // CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_REGISTRATION_IMPL_H_ | 49 #endif // CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_REGISTRATION_IMPL_H_ |
OLD | NEW |