| Index: extensions/common/extension_messages.h
|
| diff --git a/extensions/common/extension_messages.h b/extensions/common/extension_messages.h
|
| index 8b3bce3d72a2981e036bb96b699fed2264593fce..26b961dcb91e510aebbe78e0d2ba3249a5a2e8ef 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.
|
| @@ -831,3 +839,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 */)
|
|
|