Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(410)

Side by Side Diff: content/child/service_worker/web_service_worker_impl.cc

Issue 189253002: Implement ServiceWorker::postMessage() [Chromium] (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rename message handler per review feedback Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "third_party/WebKit/public/platform/WebString.h"
11
12 using blink::WebMessagePortChannel;
13 using blink::WebMessagePortChannelArray;
14 using blink::WebMessagePortChannelClient;
15 using blink::WebString;
16
7 namespace content { 17 namespace content {
8 18
9 WebServiceWorkerImpl::~WebServiceWorkerImpl() {} 19 WebServiceWorkerImpl::~WebServiceWorkerImpl() {}
10 20
21 void WebServiceWorkerImpl::postMessage(const WebString& message,
22 WebMessagePortChannelArray* channels) {
23 thread_safe_sender_->Send(new ServiceWorkerHostMsg_PostMessage(
24 registration_id_,
25 message,
26 WebMessagePortChannelImpl::ExtractMessagePortIDs(channels)));
27 }
28
11 } // namespace content 29 } // namespace content
OLDNEW
« no previous file with comments | « content/child/service_worker/web_service_worker_impl.h ('k') | content/child/webmessageportchannel_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698