OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/worker/webworker_stub.h" | 5 #include "content/worker/webworker_stub.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "content/common/child_thread.h" | 8 #include "content/common/child_thread.h" |
9 #include "content/common/content_client.h" | 9 #include "content/common/content_client.h" |
10 #include "content/common/file_system/file_system_dispatcher.h" | 10 #include "content/common/file_system/file_system_dispatcher.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 impl_->terminateWorkerContext(); | 64 impl_->terminateWorkerContext(); |
65 | 65 |
66 // Call the client to make sure context exits. | 66 // Call the client to make sure context exits. |
67 EnsureWorkerContextTerminates(); | 67 EnsureWorkerContextTerminates(); |
68 } | 68 } |
69 | 69 |
70 void WebWorkerStub::OnPostMessage( | 70 void WebWorkerStub::OnPostMessage( |
71 const string16& message, | 71 const string16& message, |
72 const std::vector<int>& sent_message_port_ids, | 72 const std::vector<int>& sent_message_port_ids, |
73 const std::vector<int>& new_routing_ids) { | 73 const std::vector<int>& new_routing_ids) { |
74 WebKit::WebMessagePortChannelArray channels(sent_message_port_ids.size()); | 74 WebKit::WebTransferableReceiptArray receipts(sent_message_port_ids.size()); |
75 for (size_t i = 0; i < sent_message_port_ids.size(); i++) { | 75 for (size_t i = 0; i < sent_message_port_ids.size(); i++) { |
76 channels[i] = new WebMessagePortChannelImpl( | 76 receipts[i] = new WebMessagePortChannelImpl( |
77 new_routing_ids[i], sent_message_port_ids[i]); | 77 new_routing_ids[i], sent_message_port_ids[i]); |
78 } | 78 } |
79 | 79 |
80 impl_->postMessageToWorkerContext(message, channels); | 80 impl_->postMessageToWorkerContext(message, receipts); |
81 } | 81 } |
OLD | NEW |