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

Unified Diff: extensions/common/extension_messages.h

Issue 2166523003: Add ref count to service workers for extension API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync@tott Created 4 years, 2 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
« no previous file with comments | « extensions/common/constants.cc ('k') | extensions/renderer/dispatcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/common/extension_messages.h
diff --git a/extensions/common/extension_messages.h b/extensions/common/extension_messages.h
index f9e9bcb31674e66f6c73de539f2194795d7689aa..55f72aa1e88a96630e42386ed5a8e59d2adc527e 100644
--- a/extensions/common/extension_messages.h
+++ b/extensions/common/extension_messages.h
@@ -116,9 +116,9 @@ IPC_STRUCT_BEGIN(ExtensionHostMsg_Request_Params)
// 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)
+ // If this API call is for a service worker, then this is the service
+ // worker version id. Otherwise, this is -1.
+ IPC_STRUCT_MEMBER(int64_t, service_worker_version_id)
IPC_STRUCT_END()
// Allows an extension to execute code in a tab.
@@ -887,3 +887,20 @@ IPC_MESSAGE_CONTROL5(ExtensionMsg_ResponseWorker,
bool /* success */,
base::ListValue /* response wrapper (see comment above) */,
std::string /* error */)
+
+// Asks the browser to increment the pending activity count for
+// the worker with version id |service_worker_version_id|.
+// Each request to increment must use unique |request_uuid|. If a request with
+// |request_uuid| is already in progress (due to race condition or renderer
+// compromise), browser process ignores the IPC.
+IPC_MESSAGE_CONTROL2(ExtensionHostMsg_IncrementServiceWorkerActivity,
+ int64_t /* service_worker_version_id */,
+ std::string /* request_uuid */)
+
+// Asks the browser to decrement the pending activity count for
+// the worker with version id |service_worker_version_id|.
+// |request_uuid| must match the GUID of a previous request, otherwise the
+// browser process ignores the IPC.
+IPC_MESSAGE_CONTROL2(ExtensionHostMsg_DecrementServiceWorkerActivity,
+ int64_t /* service_worker_version_id */,
+ std::string /* request_uuid */)
« no previous file with comments | « extensions/common/constants.cc ('k') | extensions/renderer/dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698