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

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

Issue 189253002: Implement ServiceWorker::postMessage() [Chromium] (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 #ifndef CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_IMPL_H_ 5 #ifndef CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_IMPL_H_
6 #define CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_IMPL_H_ 6 #define CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_IMPL_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/strings/string16.h"
10 #include "third_party/WebKit/public/platform/WebMessagePortChannel.h"
9 #include "third_party/WebKit/public/platform/WebServiceWorker.h" 11 #include "third_party/WebKit/public/platform/WebServiceWorker.h"
10 #include "third_party/WebKit/public/web/WebFrame.h" 12 #include "third_party/WebKit/public/web/WebFrame.h"
11 13
12 namespace content { 14 namespace content {
15 class ThreadSafeSender;
13 16
14 class WebServiceWorkerImpl 17 class WebServiceWorkerImpl
15 : NON_EXPORTED_BASE(public blink::WebServiceWorker) { 18 : NON_EXPORTED_BASE(public blink::WebServiceWorker) {
16 public: 19 public:
17 explicit WebServiceWorkerImpl(int64 registration_id) 20 WebServiceWorkerImpl(int64 registration_id,
18 : registration_id_(registration_id) {} 21 ThreadSafeSender* thread_safe_sender)
22 : registration_id_(registration_id),
23 thread_safe_sender_(thread_safe_sender) {}
19 virtual ~WebServiceWorkerImpl(); 24 virtual ~WebServiceWorkerImpl();
20 25
26 virtual void postMessage(const blink::WebString& message,
27 blink::WebMessagePortChannelArray* channels);
28
21 private: 29 private:
30 void PostMessage(const base::string16& message,
31 blink::WebMessagePortChannelArray* channels);
32
22 int64 registration_id_; 33 int64 registration_id_;
34 ThreadSafeSender* thread_safe_sender_;
michaeln 2014/03/12 23:38:47 scoped_refptr here
23 35
24 DISALLOW_COPY_AND_ASSIGN(WebServiceWorkerImpl); 36 DISALLOW_COPY_AND_ASSIGN(WebServiceWorkerImpl);
25 }; 37 };
26 38
27 } // namespace content 39 } // namespace content
28 40
29 #endif // CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_IMPL_H_ 41 #endif // CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698