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

Unified 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: 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 side-by-side diff with in-line comments
Download patch
Index: content/child/service_worker/web_service_worker_impl.h
diff --git a/content/child/service_worker/web_service_worker_impl.h b/content/child/service_worker/web_service_worker_impl.h
index de6010e212cbb5b8d5f8aefc92f3ae0f3fdba0db..3b8b28d472132ba416fe19e3c9a4b9158b3df796 100644
--- a/content/child/service_worker/web_service_worker_impl.h
+++ b/content/child/service_worker/web_service_worker_impl.h
@@ -6,20 +6,29 @@
#define CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_IMPL_H_
#include "base/compiler_specific.h"
+#include "base/strings/string16.h"
+#include "third_party/WebKit/public/platform/WebMessagePortChannel.h"
#include "third_party/WebKit/public/platform/WebServiceWorker.h"
#include "third_party/WebKit/public/web/WebFrame.h"
namespace content {
+class ThreadSafeSender;
class WebServiceWorkerImpl
: NON_EXPORTED_BASE(public blink::WebServiceWorker) {
public:
- explicit WebServiceWorkerImpl(int64 registration_id)
- : registration_id_(registration_id) {}
+ WebServiceWorkerImpl(int64 registration_id,
+ ThreadSafeSender* thread_safe_sender)
+ : registration_id_(registration_id),
+ thread_safe_sender_(thread_safe_sender) {}
virtual ~WebServiceWorkerImpl();
+ virtual void postMessage(const blink::WebString& message,
+ blink::WebMessagePortChannelArray* channels);
+
private:
int64 registration_id_;
+ ThreadSafeSender* thread_safe_sender_;
DISALLOW_COPY_AND_ASSIGN(WebServiceWorkerImpl);
};
« no previous file with comments | « content/child/service_worker/service_worker_dispatcher.cc ('k') | content/child/service_worker/web_service_worker_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698