| 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, | |
| 257 int call_id, | 256 int call_id, |
| 258 const blink::WebString& message, | 257 const blink::WebString& message, |
| 259 const blink::WebString& state) { | 258 const blink::WebString& state) { |
| 260 worker_devtools_agent_->SendDevToolsMessage( | 259 worker_devtools_agent_->SendDevToolsMessage(call_id, message, state); |
| 261 session_id, call_id, message, state); | |
| 262 } | 260 } |
| 263 | 261 |
| 264 void EmbeddedSharedWorkerStub::Shutdown() { | 262 void EmbeddedSharedWorkerStub::Shutdown() { |
| 265 // WebSharedWorker must be already deleted in the blink side | 263 // WebSharedWorker must be already deleted in the blink side |
| 266 // when this is called. | 264 // when this is called. |
| 267 impl_ = nullptr; | 265 impl_ = nullptr; |
| 268 delete this; | 266 delete this; |
| 269 } | 267 } |
| 270 | 268 |
| 271 bool EmbeddedSharedWorkerStub::Send(IPC::Message* message) { | 269 bool EmbeddedSharedWorkerStub::Send(IPC::Message* message) { |
| (...skipping 24 matching lines...) Expand all Loading... |
| 296 } | 294 } |
| 297 } | 295 } |
| 298 | 296 |
| 299 void EmbeddedSharedWorkerStub::OnTerminateWorkerContext() { | 297 void EmbeddedSharedWorkerStub::OnTerminateWorkerContext() { |
| 300 // After this we wouldn't get any IPC for this stub. | 298 // After this we wouldn't get any IPC for this stub. |
| 301 running_ = false; | 299 running_ = false; |
| 302 impl_->terminateWorkerContext(); | 300 impl_->terminateWorkerContext(); |
| 303 } | 301 } |
| 304 | 302 |
| 305 } // namespace content | 303 } // namespace content |
| OLD | NEW |