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 #include "content/renderer/shared_worker/embedded_shared_worker_stub.h" | 5 #include "content/renderer/shared_worker/embedded_shared_worker_stub.h" |
6 | 6 |
7 #include "base/message_loop/message_loop_proxy.h" | 7 #include "base/message_loop/message_loop_proxy.h" |
8 #include "content/child/appcache/appcache_dispatcher.h" | 8 #include "content/child/appcache/appcache_dispatcher.h" |
9 #include "content/child/appcache/web_application_cache_host_impl.h" | 9 #include "content/child/appcache/web_application_cache_host_impl.h" |
10 #include "content/child/request_extra_data.h" | 10 #include "content/child/request_extra_data.h" |
11 #include "content/child/scoped_child_process_reference.h" | 11 #include "content/child/scoped_child_process_reference.h" |
12 #include "content/child/service_worker/service_worker_handle_reference.h" | 12 #include "content/child/service_worker/service_worker_handle_reference.h" |
13 #include "content/child/service_worker/service_worker_network_provider.h" | 13 #include "content/child/service_worker/service_worker_network_provider.h" |
14 #include "content/child/service_worker/service_worker_provider_context.h" | 14 #include "content/child/service_worker/service_worker_provider_context.h" |
15 #include "content/child/shared_worker_devtools_agent.h" | 15 #include "content/child/shared_worker_devtools_agent.h" |
16 #include "content/child/webmessageportchannel_impl.h" | 16 #include "content/child/webmessageportchannel_impl.h" |
17 #include "content/common/worker_messages.h" | 17 #include "content/common/worker_messages.h" |
18 #include "content/renderer/render_thread_impl.h" | 18 #include "content/renderer/render_thread_impl.h" |
19 #include "content/renderer/shared_worker/embedded_shared_worker_permission_clien
t_proxy.h" | 19 #include "content/renderer/shared_worker/embedded_shared_worker_content_settings
_client_proxy.h" |
20 #include "ipc/ipc_message_macros.h" | 20 #include "ipc/ipc_message_macros.h" |
21 #include "third_party/WebKit/public/platform/WebURLRequest.h" | 21 #include "third_party/WebKit/public/platform/WebURLRequest.h" |
22 #include "third_party/WebKit/public/web/WebDataSource.h" | 22 #include "third_party/WebKit/public/web/WebDataSource.h" |
23 #include "third_party/WebKit/public/web/WebSecurityOrigin.h" | 23 #include "third_party/WebKit/public/web/WebSecurityOrigin.h" |
24 #include "third_party/WebKit/public/web/WebServiceWorkerNetworkProvider.h" | 24 #include "third_party/WebKit/public/web/WebServiceWorkerNetworkProvider.h" |
25 #include "third_party/WebKit/public/web/WebSharedWorker.h" | 25 #include "third_party/WebKit/public/web/WebSharedWorker.h" |
26 #include "third_party/WebKit/public/web/WebSharedWorkerClient.h" | 26 #include "third_party/WebKit/public/web/WebSharedWorkerClient.h" |
27 | 27 |
28 namespace content { | 28 namespace content { |
29 | 29 |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 return NULL; | 213 return NULL; |
214 } | 214 } |
215 | 215 |
216 blink::WebApplicationCacheHost* | 216 blink::WebApplicationCacheHost* |
217 EmbeddedSharedWorkerStub::createApplicationCacheHost( | 217 EmbeddedSharedWorkerStub::createApplicationCacheHost( |
218 blink::WebApplicationCacheHostClient* client) { | 218 blink::WebApplicationCacheHostClient* client) { |
219 app_cache_host_ = new SharedWorkerWebApplicationCacheHostImpl(client); | 219 app_cache_host_ = new SharedWorkerWebApplicationCacheHostImpl(client); |
220 return app_cache_host_; | 220 return app_cache_host_; |
221 } | 221 } |
222 | 222 |
223 blink::WebWorkerPermissionClientProxy* | 223 blink::WebWorkerContentSettingsClientProxy* |
224 EmbeddedSharedWorkerStub::createWorkerPermissionClientProxy( | 224 EmbeddedSharedWorkerStub::createWorkerContentSettingsClientProxy( |
225 const blink::WebSecurityOrigin& origin) { | 225 const blink::WebSecurityOrigin& origin) { |
226 return new EmbeddedSharedWorkerPermissionClientProxy( | 226 return new EmbeddedSharedWorkerContentSettingsClientProxy( |
227 GURL(origin.toString()), | 227 GURL(origin.toString()), |
228 origin.isUnique(), | 228 origin.isUnique(), |
229 route_id_, | 229 route_id_, |
230 ChildThreadImpl::current()->thread_safe_sender()); | 230 ChildThreadImpl::current()->thread_safe_sender()); |
231 } | 231 } |
232 | 232 |
233 blink::WebServiceWorkerNetworkProvider* | 233 blink::WebServiceWorkerNetworkProvider* |
234 EmbeddedSharedWorkerStub::createServiceWorkerNetworkProvider( | 234 EmbeddedSharedWorkerStub::createServiceWorkerNetworkProvider( |
235 blink::WebDataSource* data_source) { | 235 blink::WebDataSource* data_source) { |
236 // Create a content::ServiceWorkerNetworkProvider for this data source so | 236 // Create a content::ServiceWorkerNetworkProvider for this data source so |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 pending_channels_.push_back(channel); | 290 pending_channels_.push_back(channel); |
291 } | 291 } |
292 } | 292 } |
293 | 293 |
294 void EmbeddedSharedWorkerStub::OnTerminateWorkerContext() { | 294 void EmbeddedSharedWorkerStub::OnTerminateWorkerContext() { |
295 runing_ = false; | 295 runing_ = false; |
296 impl_->terminateWorkerContext(); | 296 impl_->terminateWorkerContext(); |
297 } | 297 } |
298 | 298 |
299 } // namespace content | 299 } // namespace content |
OLD | NEW |