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_RENDERER_SERVICE_WORKER_EMBEDDED_WORKER_CONTEXT_CLIENT_H_ | 5 #ifndef CONTENT_RENDERER_SERVICE_WORKER_EMBEDDED_WORKER_CONTEXT_CLIENT_H_ |
6 #define CONTENT_RENDERER_SERVICE_WORKER_EMBEDDED_WORKER_CONTEXT_CLIENT_H_ | 6 #define CONTENT_RENDERER_SERVICE_WORKER_EMBEDDED_WORKER_CONTEXT_CLIENT_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
11 #include "content/common/service_worker/service_worker_types.h" | 11 #include "content/common/service_worker/service_worker_types.h" |
12 #include "ipc/ipc_listener.h" | 12 #include "ipc/ipc_listener.h" |
13 #include "third_party/WebKit/public/platform/WebServiceWorkerClientFocusCallback
.h" | |
14 #include "third_party/WebKit/public/platform/WebServiceWorkerClientsInfo.h" | |
15 #include "third_party/WebKit/public/platform/WebServiceWorkerEventResult.h" | |
16 #include "third_party/WebKit/public/platform/WebServiceWorkerSkipWaitingCallback
s.h" | |
17 #include "third_party/WebKit/public/platform/WebURL.h" | |
18 #include "third_party/WebKit/public/web/WebServiceWorkerContextClient.h" | 13 #include "third_party/WebKit/public/web/WebServiceWorkerContextClient.h" |
19 #include "url/gurl.h" | 14 #include "url/gurl.h" |
20 | 15 |
21 namespace base { | 16 namespace base { |
22 class MessageLoopProxy; | 17 class MessageLoopProxy; |
23 class TaskRunner; | 18 class TaskRunner; |
24 } | 19 } |
25 | 20 |
26 namespace blink { | 21 namespace blink { |
27 class WebDataSource; | 22 class WebDataSource; |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 const blink::WebString& message, | 103 const blink::WebString& message, |
109 blink::WebMessagePortChannelArray* channels); | 104 blink::WebMessagePortChannelArray* channels); |
110 virtual void postMessageToCrossOriginClient( | 105 virtual void postMessageToCrossOriginClient( |
111 const blink::WebCrossOriginServiceWorkerClient& client, | 106 const blink::WebCrossOriginServiceWorkerClient& client, |
112 const blink::WebString& message, | 107 const blink::WebString& message, |
113 blink::WebMessagePortChannelArray* channels); | 108 blink::WebMessagePortChannelArray* channels); |
114 virtual void focus(int client_id, | 109 virtual void focus(int client_id, |
115 blink::WebServiceWorkerClientFocusCallback*); | 110 blink::WebServiceWorkerClientFocusCallback*); |
116 virtual void skipWaiting( | 111 virtual void skipWaiting( |
117 blink::WebServiceWorkerSkipWaitingCallbacks* callbacks); | 112 blink::WebServiceWorkerSkipWaitingCallbacks* callbacks); |
| 113 virtual void claim(blink::WebServiceWorkerClientsClaimCallbacks* callbacks); |
118 | 114 |
119 // TODO: Implement DevTools related method overrides. | 115 // TODO: Implement DevTools related method overrides. |
120 | 116 |
121 int embedded_worker_id() const { return embedded_worker_id_; } | 117 int embedded_worker_id() const { return embedded_worker_id_; } |
122 base::MessageLoopProxy* main_thread_proxy() const { | 118 base::MessageLoopProxy* main_thread_proxy() const { |
123 return main_thread_proxy_.get(); | 119 return main_thread_proxy_.get(); |
124 } | 120 } |
125 ThreadSafeSender* thread_safe_sender() { return sender_.get(); } | 121 ThreadSafeSender* thread_safe_sender() { return sender_.get(); } |
126 | 122 |
127 private: | 123 private: |
(...skipping 14 matching lines...) Expand all Loading... |
142 scoped_ptr<ServiceWorkerScriptContext> script_context_; | 138 scoped_ptr<ServiceWorkerScriptContext> script_context_; |
143 | 139 |
144 base::WeakPtrFactory<EmbeddedWorkerContextClient> weak_factory_; | 140 base::WeakPtrFactory<EmbeddedWorkerContextClient> weak_factory_; |
145 | 141 |
146 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerContextClient); | 142 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerContextClient); |
147 }; | 143 }; |
148 | 144 |
149 } // namespace content | 145 } // namespace content |
150 | 146 |
151 #endif // CONTENT_RENDERER_SERVICE_WORKER_EMBEDDED_WORKER_CONTEXT_CLIENT_H_ | 147 #endif // CONTENT_RENDERER_SERVICE_WORKER_EMBEDDED_WORKER_CONTEXT_CLIENT_H_ |
OLD | NEW |