| 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 "chrome/renderer/webworker_base.h" | 5 #include "chrome/renderer/webworker_base.h" |
| 6 | 6 |
| 7 #include "chrome/common/child_thread.h" | 7 #include "chrome/common/child_thread.h" |
| 8 #include "chrome/common/render_messages.h" | 8 #include "chrome/common/render_messages.h" |
| 9 #include "chrome/common/webmessageportchannel_impl.h" | 9 #include "chrome/common/webmessageportchannel_impl.h" |
| 10 #include "chrome/common/worker_messages.h" | 10 #include "chrome/common/worker_messages.h" |
| 11 #include "webkit/api/public/WebURL.h" | 11 #include "third_party/WebKit/WebKit/chromium/public/WebURL.h" |
| 12 #include "webkit/api/public/WebWorkerClient.h" | 12 #include "third_party/WebKit/WebKit/chromium/public/WebWorkerClient.h" |
| 13 | 13 |
| 14 using WebKit::WebMessagePortChannel; | 14 using WebKit::WebMessagePortChannel; |
| 15 using WebKit::WebMessagePortChannelArray; | 15 using WebKit::WebMessagePortChannelArray; |
| 16 using WebKit::WebString; | 16 using WebKit::WebString; |
| 17 using WebKit::WebURL; | 17 using WebKit::WebURL; |
| 18 using WebKit::WebWorkerClient; | 18 using WebKit::WebWorkerClient; |
| 19 | 19 |
| 20 WebWorkerBase::WebWorkerBase( | 20 WebWorkerBase::WebWorkerBase( |
| 21 ChildThread* child_thread, | 21 ChildThread* child_thread, |
| 22 int route_id, | 22 int route_id, |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 | 95 |
| 96 void WebWorkerBase::SendQueuedMessages() { | 96 void WebWorkerBase::SendQueuedMessages() { |
| 97 DCHECK(queued_messages_.size()); | 97 DCHECK(queued_messages_.size()); |
| 98 std::vector<IPC::Message*> queued_messages = queued_messages_; | 98 std::vector<IPC::Message*> queued_messages = queued_messages_; |
| 99 queued_messages_.clear(); | 99 queued_messages_.clear(); |
| 100 for (size_t i = 0; i < queued_messages.size(); ++i) { | 100 for (size_t i = 0; i < queued_messages.size(); ++i) { |
| 101 queued_messages[i]->set_routing_id(route_id_); | 101 queued_messages[i]->set_routing_id(route_id_); |
| 102 Send(queued_messages[i]); | 102 Send(queued_messages[i]); |
| 103 } | 103 } |
| 104 } | 104 } |
| OLD | NEW |