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/thread_task_runner_handle.h" | 7 #include "base/thread_task_runner_handle.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" |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 DataSourceExtraData* extra_data = new DataSourceExtraData(); | 246 DataSourceExtraData* extra_data = new DataSourceExtraData(); |
247 data_source->setExtraData(extra_data); | 247 data_source->setExtraData(extra_data); |
248 ServiceWorkerNetworkProvider::AttachToDocumentState( | 248 ServiceWorkerNetworkProvider::AttachToDocumentState( |
249 extra_data, provider.Pass()); | 249 extra_data, provider.Pass()); |
250 | 250 |
251 // Blink is responsible for deleting the returned object. | 251 // Blink is responsible for deleting the returned object. |
252 return new WebServiceWorkerNetworkProviderImpl(); | 252 return new WebServiceWorkerNetworkProviderImpl(); |
253 } | 253 } |
254 | 254 |
255 void EmbeddedSharedWorkerStub::sendDevToolsMessage( | 255 void EmbeddedSharedWorkerStub::sendDevToolsMessage( |
| 256 int session_id, |
256 int call_id, | 257 int call_id, |
257 const blink::WebString& message, | 258 const blink::WebString& message, |
258 const blink::WebString& state) { | 259 const blink::WebString& state) { |
259 worker_devtools_agent_->SendDevToolsMessage(call_id, message, state); | 260 worker_devtools_agent_->SendDevToolsMessage( |
| 261 session_id, call_id, message, state); |
260 } | 262 } |
261 | 263 |
262 void EmbeddedSharedWorkerStub::Shutdown() { | 264 void EmbeddedSharedWorkerStub::Shutdown() { |
263 // WebSharedWorker must be already deleted in the blink side | 265 // WebSharedWorker must be already deleted in the blink side |
264 // when this is called. | 266 // when this is called. |
265 impl_ = nullptr; | 267 impl_ = nullptr; |
266 delete this; | 268 delete this; |
267 } | 269 } |
268 | 270 |
269 bool EmbeddedSharedWorkerStub::Send(IPC::Message* message) { | 271 bool EmbeddedSharedWorkerStub::Send(IPC::Message* message) { |
(...skipping 24 matching lines...) Expand all Loading... |
294 } | 296 } |
295 } | 297 } |
296 | 298 |
297 void EmbeddedSharedWorkerStub::OnTerminateWorkerContext() { | 299 void EmbeddedSharedWorkerStub::OnTerminateWorkerContext() { |
298 // After this we wouldn't get any IPC for this stub. | 300 // After this we wouldn't get any IPC for this stub. |
299 running_ = false; | 301 running_ = false; |
300 impl_->terminateWorkerContext(); | 302 impl_->terminateWorkerContext(); |
301 } | 303 } |
302 | 304 |
303 } // namespace content | 305 } // namespace content |
OLD | NEW |