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 <stdint.h> | 7 #include <stdint.h> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/thread_task_runner_handle.h" | 10 #include "base/thread_task_runner_handle.h" |
11 #include "content/child/appcache/appcache_dispatcher.h" | 11 #include "content/child/appcache/appcache_dispatcher.h" |
12 #include "content/child/appcache/web_application_cache_host_impl.h" | 12 #include "content/child/appcache/web_application_cache_host_impl.h" |
13 #include "content/child/request_extra_data.h" | 13 #include "content/child/request_extra_data.h" |
14 #include "content/child/scoped_child_process_reference.h" | 14 #include "content/child/scoped_child_process_reference.h" |
15 #include "content/child/service_worker/service_worker_handle_reference.h" | 15 #include "content/child/service_worker/service_worker_handle_reference.h" |
16 #include "content/child/service_worker/service_worker_network_provider.h" | 16 #include "content/child/service_worker/service_worker_network_provider.h" |
17 #include "content/child/service_worker/service_worker_provider_context.h" | 17 #include "content/child/service_worker/service_worker_provider_context.h" |
18 #include "content/child/shared_worker_devtools_agent.h" | 18 #include "content/child/shared_worker_devtools_agent.h" |
19 #include "content/child/webmessageportchannel_impl.h" | 19 #include "content/child/webmessageportchannel_impl.h" |
20 #include "content/common/worker_messages.h" | 20 #include "content/common/worker_messages.h" |
21 #include "content/renderer/render_thread_impl.h" | 21 #include "content/renderer/render_thread_impl.h" |
22 #include "content/renderer/shared_worker/embedded_shared_worker_content_settings
_client_proxy.h" | 22 #include "content/renderer/shared_worker/embedded_shared_worker_content_settings
_client_proxy.h" |
23 #include "ipc/ipc_message_macros.h" | 23 #include "ipc/ipc_message_macros.h" |
| 24 #include "third_party/WebKit/public/platform/URLConversion.h" |
24 #include "third_party/WebKit/public/platform/WebURLRequest.h" | 25 #include "third_party/WebKit/public/platform/WebURLRequest.h" |
25 #include "third_party/WebKit/public/web/WebDataSource.h" | 26 #include "third_party/WebKit/public/web/WebDataSource.h" |
26 #include "third_party/WebKit/public/web/WebSecurityOrigin.h" | 27 #include "third_party/WebKit/public/web/WebSecurityOrigin.h" |
27 #include "third_party/WebKit/public/web/WebSharedWorker.h" | 28 #include "third_party/WebKit/public/web/WebSharedWorker.h" |
28 #include "third_party/WebKit/public/web/WebSharedWorkerClient.h" | 29 #include "third_party/WebKit/public/web/WebSharedWorkerClient.h" |
29 #include "third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerNe
tworkProvider.h" | 30 #include "third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerNe
tworkProvider.h" |
30 | 31 |
31 namespace content { | 32 namespace content { |
32 | 33 |
33 namespace { | 34 namespace { |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 EmbeddedSharedWorkerStub::createApplicationCacheHost( | 223 EmbeddedSharedWorkerStub::createApplicationCacheHost( |
223 blink::WebApplicationCacheHostClient* client) { | 224 blink::WebApplicationCacheHostClient* client) { |
224 app_cache_host_ = new SharedWorkerWebApplicationCacheHostImpl(client); | 225 app_cache_host_ = new SharedWorkerWebApplicationCacheHostImpl(client); |
225 return app_cache_host_; | 226 return app_cache_host_; |
226 } | 227 } |
227 | 228 |
228 blink::WebWorkerContentSettingsClientProxy* | 229 blink::WebWorkerContentSettingsClientProxy* |
229 EmbeddedSharedWorkerStub::createWorkerContentSettingsClientProxy( | 230 EmbeddedSharedWorkerStub::createWorkerContentSettingsClientProxy( |
230 const blink::WebSecurityOrigin& origin) { | 231 const blink::WebSecurityOrigin& origin) { |
231 return new EmbeddedSharedWorkerContentSettingsClientProxy( | 232 return new EmbeddedSharedWorkerContentSettingsClientProxy( |
232 GURL(origin.toString()), | 233 blink::WebStringToGURL(origin.toString()), |
233 origin.isUnique(), | 234 origin.isUnique(), |
234 route_id_, | 235 route_id_, |
235 ChildThreadImpl::current()->thread_safe_sender()); | 236 ChildThreadImpl::current()->thread_safe_sender()); |
236 } | 237 } |
237 | 238 |
238 blink::WebServiceWorkerNetworkProvider* | 239 blink::WebServiceWorkerNetworkProvider* |
239 EmbeddedSharedWorkerStub::createServiceWorkerNetworkProvider( | 240 EmbeddedSharedWorkerStub::createServiceWorkerNetworkProvider( |
240 blink::WebDataSource* data_source) { | 241 blink::WebDataSource* data_source) { |
241 // Create a content::ServiceWorkerNetworkProvider for this data source so | 242 // Create a content::ServiceWorkerNetworkProvider for this data source so |
242 // we can observe its requests. | 243 // we can observe its requests. |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 } | 300 } |
300 } | 301 } |
301 | 302 |
302 void EmbeddedSharedWorkerStub::OnTerminateWorkerContext() { | 303 void EmbeddedSharedWorkerStub::OnTerminateWorkerContext() { |
303 // After this we wouldn't get any IPC for this stub. | 304 // After this we wouldn't get any IPC for this stub. |
304 running_ = false; | 305 running_ = false; |
305 impl_->terminateWorkerContext(); | 306 impl_->terminateWorkerContext(); |
306 } | 307 } |
307 | 308 |
308 } // namespace content | 309 } // namespace content |
OLD | NEW |