Index: extensions/common/extension_messages.h |
diff --git a/extensions/common/extension_messages.h b/extensions/common/extension_messages.h |
index bd48626c3e630750bfbfbfd7e36ae4a7d565e330..fe06a71ccdf0527a1893f05b8a2c1751300e592f 100644 |
--- a/extensions/common/extension_messages.h |
+++ b/extensions/common/extension_messages.h |
@@ -106,6 +106,14 @@ IPC_STRUCT_BEGIN(ExtensionHostMsg_Request_Params) |
// True if request is executed in response to an explicit user gesture. |
IPC_STRUCT_MEMBER(bool, user_gesture) |
+ |
+ // If this API call is for a service worker, then this is the worker thread |
+ // id. Otherwise, this is -1. |
+ IPC_STRUCT_MEMBER(int, worker_thread_id) |
+ |
+ // If this API call is for a service worker, then this is the embedded |
+ // worker id. Otherwise, this is -1. |
+ IPC_STRUCT_MEMBER(int, embedded_worker_id) |
IPC_STRUCT_END() |
// Allows an extension to execute code in a tab. |
@@ -838,3 +846,22 @@ IPC_MESSAGE_ROUTED3(ExtensionHostMsg_AutomationQuerySelector_Result, |
int /* request_id */, |
ExtensionHostMsg_AutomationQuerySelector_Error /* error */, |
int /* result_acc_obj_id */) |
+ |
+// Messages related to Extension Service Worker. |
+#undef IPC_MESSAGE_START |
+#define IPC_MESSAGE_START ExtensionWorkerMsgStart |
+// A service worker thread sends this message when an extension service worker |
+// starts an API request. The browser will always respond with a |
+// ExtensionMsg_ResponseWorker. |
+IPC_MESSAGE_CONTROL1(ExtensionHostMsg_RequestWorker, |
+ ExtensionHostMsg_Request_Params) |
+ |
+// The browser sends this message in response to all service worker extension |
+// api calls. The response data (if any) is one of the base::Value subclasses, |
+// wrapped as the first element in a ListValue. |
+IPC_MESSAGE_CONTROL5(ExtensionMsg_ResponseWorker, |
+ int /* thread_id */, |
+ int /* request_id */, |
+ bool /* success */, |
+ base::ListValue /* response wrapper (see comment above) */, |
+ std::string /* error */) |