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

Unified Diff: extensions/common/extension_messages.h

Issue 1880933002: Begin to enable extension APIs in Extension Service Worker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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: extensions/common/extension_messages.h
diff --git a/extensions/common/extension_messages.h b/extensions/common/extension_messages.h
index 904c2f98b42ee2e154b2971bd3c5e0ebeeb8f0cf..17c7bfb4239390124d5aafc67c44b0826e8cb02c 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.
Devlin 2016/04/13 19:46:31 Otherwise, this is...?
lazyboy 2016/04/14 02:07:53 Done.
+ IPC_STRUCT_MEMBER(int, worker_thread_id)
+
+ // If this API call is for a service worker, then this is the embedded
+ // worker id.
Devlin 2016/04/13 19:46:31 ditto
lazyboy 2016/04/14 02:07:53 Done.
+ 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 */)

Powered by Google App Engine
This is Rietveld 408576698