Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/child/service_worker/web_service_worker_impl.h" | 5 #include "content/child/service_worker/web_service_worker_impl.h" |
| 6 | 6 |
| 7 #include "content/child/thread_safe_sender.h" | |
| 8 #include "content/child/webmessageportchannel_impl.h" | |
| 9 #include "content/common/service_worker/service_worker_messages.h" | |
| 10 #include "ipc/ipc_message.h" | |
|
jam
2014/03/19 21:08:48
nit: don't need this, you get this automatically f
jsbell
2014/03/19 23:52:39
Done. (Left over from before ExtractMessagePortIDs
| |
| 11 #include "third_party/WebKit/public/platform/WebString.h" | |
| 12 | |
| 13 using blink::WebMessagePortChannel; | |
| 14 using blink::WebMessagePortChannelArray; | |
| 15 using blink::WebMessagePortChannelClient; | |
| 16 using blink::WebString; | |
| 17 | |
| 7 namespace content { | 18 namespace content { |
| 8 | 19 |
| 9 WebServiceWorkerImpl::~WebServiceWorkerImpl() {} | 20 WebServiceWorkerImpl::~WebServiceWorkerImpl() {} |
| 10 | 21 |
| 22 void WebServiceWorkerImpl::postMessage(const WebString& message, | |
| 23 WebMessagePortChannelArray* channels) { | |
| 24 std::vector<int> message_port_ids; | |
| 25 WebMessagePortChannelImpl::ExtractMessagePortIDs(channels, &message_port_ids); | |
| 26 thread_safe_sender_->Send(new ServiceWorkerHostMsg_PostMessage( | |
| 27 registration_id_, message, message_port_ids)); | |
| 28 } | |
| 29 | |
| 11 } // namespace content | 30 } // namespace content |
| OLD | NEW |