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

Unified Diff: content/common/service_worker/service_worker_messages.h

Issue 189253002: Implement ServiceWorker::postMessage() [Chromium] (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reup 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/common/service_worker/service_worker_messages.h
diff --git a/content/common/service_worker/service_worker_messages.h b/content/common/service_worker/service_worker_messages.h
index fbaca833575b3f302432b8f5eaf86417e8d162fc..2808e5c3be2b1fb180f717ec234a5a890eb63a53 100644
--- a/content/common/service_worker/service_worker_messages.h
+++ b/content/common/service_worker/service_worker_messages.h
@@ -46,6 +46,12 @@ IPC_MESSAGE_CONTROL3(ServiceWorkerHostMsg_UnregisterServiceWorker,
int32 /* request_id */,
GURL /* scope (url pattern) */)
+// Sends a 'message' event to a service worker (renderer->browser).
+IPC_MESSAGE_CONTROL3(ServiceWorkerHostMsg_PostMessage,
+ int64 /* registration_id */,
+ base::string16 /* message */,
+ std::vector<int> /* sent_message_port_ids */)
+
// Messages sent from the browser to the child process.
// Response to ServiceWorkerMsg_RegisterServiceWorker
@@ -75,6 +81,12 @@ IPC_MESSAGE_CONTROL1(ServiceWorkerMsg_InstallEvent,
IPC_MESSAGE_CONTROL1(ServiceWorkerMsg_FetchEvent,
content::ServiceWorkerFetchRequest)
+// Sends a 'message' event to a service worker (browser->EmbeddedWorker).
+IPC_MESSAGE_CONTROL3(ServiceWorkerMsg_Message,
+ base::string16 /* message */,
+ std::vector<int> /* sent_message_port_ids */,
+ std::vector<int> /* new_routing_ids */)
+
// Informs the browser of a new ServiceWorkerProvider in the child process,
// |provider_id| is unique within its child process.
IPC_MESSAGE_CONTROL1(ServiceWorkerHostMsg_ProviderCreated,

Powered by Google App Engine
This is Rietveld 408576698