Index: content/child/service_worker/web_service_worker_impl.cc |
diff --git a/content/child/service_worker/web_service_worker_impl.cc b/content/child/service_worker/web_service_worker_impl.cc |
index 02d9cf8ca772096907baeb01c944c7a11d9f3a3e..aab625ae5f2816fe555643564c921bfe2559e7c8 100644 |
--- a/content/child/service_worker/web_service_worker_impl.cc |
+++ b/content/child/service_worker/web_service_worker_impl.cc |
@@ -4,8 +4,27 @@ |
#include "content/child/service_worker/web_service_worker_impl.h" |
+#include "content/child/thread_safe_sender.h" |
+#include "content/child/webmessageportchannel_impl.h" |
+#include "content/common/service_worker/service_worker_messages.h" |
+#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
|
+#include "third_party/WebKit/public/platform/WebString.h" |
+ |
+using blink::WebMessagePortChannel; |
+using blink::WebMessagePortChannelArray; |
+using blink::WebMessagePortChannelClient; |
+using blink::WebString; |
+ |
namespace content { |
WebServiceWorkerImpl::~WebServiceWorkerImpl() {} |
+void WebServiceWorkerImpl::postMessage(const WebString& message, |
+ WebMessagePortChannelArray* channels) { |
+ std::vector<int> message_port_ids; |
+ WebMessagePortChannelImpl::ExtractMessagePortIDs(channels, &message_port_ids); |
+ thread_safe_sender_->Send(new ServiceWorkerHostMsg_PostMessage( |
+ registration_id_, message, message_port_ids)); |
+} |
+ |
} // namespace content |