OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/webworker_base.h" | 5 #include "content/renderer/webworker_base.h" |
6 | 6 |
7 #include "chrome/common/render_messages.h" | |
8 #include "chrome/common/render_messages_params.h" | |
9 #include "content/common/child_thread.h" | 7 #include "content/common/child_thread.h" |
| 8 #include "content/common/view_messages.h" |
10 #include "content/common/webmessageportchannel_impl.h" | 9 #include "content/common/webmessageportchannel_impl.h" |
11 #include "content/common/worker_messages.h" | 10 #include "content/common/worker_messages.h" |
12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h" | 11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h" |
13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebWorkerClient.h" | 12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebWorkerClient.h" |
14 | 13 |
15 using WebKit::WebMessagePortChannel; | 14 using WebKit::WebMessagePortChannel; |
16 using WebKit::WebMessagePortChannelArray; | 15 using WebKit::WebMessagePortChannelArray; |
17 using WebKit::WebString; | 16 using WebKit::WebString; |
18 using WebKit::WebURL; | 17 using WebKit::WebURL; |
19 using WebKit::WebWorkerClient; | 18 using WebKit::WebWorkerClient; |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 | 110 |
112 void WebWorkerBase::SendQueuedMessages() { | 111 void WebWorkerBase::SendQueuedMessages() { |
113 DCHECK(queued_messages_.size()); | 112 DCHECK(queued_messages_.size()); |
114 std::vector<IPC::Message*> queued_messages = queued_messages_; | 113 std::vector<IPC::Message*> queued_messages = queued_messages_; |
115 queued_messages_.clear(); | 114 queued_messages_.clear(); |
116 for (size_t i = 0; i < queued_messages.size(); ++i) { | 115 for (size_t i = 0; i < queued_messages.size(); ++i) { |
117 queued_messages[i]->set_routing_id(route_id_); | 116 queued_messages[i]->set_routing_id(route_id_); |
118 Send(queued_messages[i]); | 117 Send(queued_messages[i]); |
119 } | 118 } |
120 } | 119 } |
OLD | NEW |