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/browser/shared_worker/shared_worker_host.h" | 5 #include "content/browser/shared_worker/shared_worker_host.h" |
6 | 6 |
7 #include "content/browser/message_port_service.h" | 7 #include "content/browser/message_port_service.h" |
8 #include "content/browser/shared_worker/shared_worker_instance.h" | 8 #include "content/browser/shared_worker/shared_worker_instance.h" |
9 #include "content/browser/shared_worker/shared_worker_message_filter.h" | 9 #include "content/browser/shared_worker/shared_worker_message_filter.h" |
10 #include "content/common/view_messages.h" | 10 #include "content/common/view_messages.h" |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 MessagePortService::GetInstance()->SendQueuedMessagesIfPossible( | 186 MessagePortService::GetInstance()->SendQueuedMessagesIfPossible( |
187 sent_message_port_id); | 187 sent_message_port_id); |
188 } else { | 188 } else { |
189 IPC::Message* new_message = new IPC::Message(message); | 189 IPC::Message* new_message = new IPC::Message(message); |
190 new_message->set_routing_id(worker_route_id_); | 190 new_message->set_routing_id(worker_route_id_); |
191 Send(new_message); | 191 Send(new_message); |
192 return; | 192 return; |
193 } | 193 } |
194 } | 194 } |
195 | 195 |
| 196 void SharedWorkerHost::TerminateWorker() { |
| 197 Send(new WorkerMsg_TerminateWorkerContext(worker_route_id_)); |
| 198 } |
| 199 |
196 } // namespace content | 200 } // namespace content |
OLD | NEW |