OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_IMPL_H_ | 5 #ifndef CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_IMPL_H_ |
6 #define CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_IMPL_H_ | 6 #define CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_IMPL_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 void OnStateChanged(blink::WebServiceWorkerState new_state); | 43 void OnStateChanged(blink::WebServiceWorkerState new_state); |
44 | 44 |
45 // blink::WebServiceWorker overrides. | 45 // blink::WebServiceWorker overrides. |
46 void setProxy(blink::WebServiceWorkerProxy* proxy) override; | 46 void setProxy(blink::WebServiceWorkerProxy* proxy) override; |
47 blink::WebServiceWorkerProxy* proxy() override; | 47 blink::WebServiceWorkerProxy* proxy() override; |
48 blink::WebURL url() const override; | 48 blink::WebURL url() const override; |
49 blink::WebServiceWorkerState state() const override; | 49 blink::WebServiceWorkerState state() const override; |
50 void postMessage(blink::WebServiceWorkerProvider* provider, | 50 void postMessage(blink::WebServiceWorkerProvider* provider, |
51 const blink::WebString& message, | 51 const blink::WebString& message, |
52 const blink::WebSecurityOrigin& source_origin, | 52 const blink::WebSecurityOrigin& source_origin, |
53 blink::WebMessagePortChannelArray* channels) override; | 53 blink::WebMessagePortChannelArray channels) override; |
54 void terminate() override; | 54 void terminate() override; |
55 | 55 |
56 // Creates WebServiceWorker::Handle object that owns a reference to the given | 56 // Creates WebServiceWorker::Handle object that owns a reference to the given |
57 // WebServiceWorkerImpl object. | 57 // WebServiceWorkerImpl object. |
58 static std::unique_ptr<blink::WebServiceWorker::Handle> CreateHandle( | 58 static std::unique_ptr<blink::WebServiceWorker::Handle> CreateHandle( |
59 const scoped_refptr<WebServiceWorkerImpl>& worker); | 59 const scoped_refptr<WebServiceWorkerImpl>& worker); |
60 | 60 |
61 private: | 61 private: |
62 friend class base::RefCounted<WebServiceWorkerImpl>; | 62 friend class base::RefCounted<WebServiceWorkerImpl>; |
63 ~WebServiceWorkerImpl() override; | 63 ~WebServiceWorkerImpl() override; |
64 | 64 |
65 std::unique_ptr<ServiceWorkerHandleReference> handle_ref_; | 65 std::unique_ptr<ServiceWorkerHandleReference> handle_ref_; |
66 blink::WebServiceWorkerState state_; | 66 blink::WebServiceWorkerState state_; |
67 scoped_refptr<ThreadSafeSender> thread_safe_sender_; | 67 scoped_refptr<ThreadSafeSender> thread_safe_sender_; |
68 blink::WebServiceWorkerProxy* proxy_; | 68 blink::WebServiceWorkerProxy* proxy_; |
69 | 69 |
70 DISALLOW_COPY_AND_ASSIGN(WebServiceWorkerImpl); | 70 DISALLOW_COPY_AND_ASSIGN(WebServiceWorkerImpl); |
71 }; | 71 }; |
72 | 72 |
73 } // namespace content | 73 } // namespace content |
74 | 74 |
75 #endif // CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_IMPL_H_ | 75 #endif // CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_IMPL_H_ |
OLD | NEW |