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

Side by Side 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: address test comments + rename public methods 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // IPC messages for extensions. 5 // IPC messages for extensions.
6 // Multiply-included message file, hence no include guard. 6 // Multiply-included message file, hence no include guard.
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 // True if request has a callback specified. 109 // True if request has a callback specified.
110 IPC_STRUCT_MEMBER(bool, has_callback) 110 IPC_STRUCT_MEMBER(bool, has_callback)
111 111
112 // True if request is executed in response to an explicit user gesture. 112 // True if request is executed in response to an explicit user gesture.
113 IPC_STRUCT_MEMBER(bool, user_gesture) 113 IPC_STRUCT_MEMBER(bool, user_gesture)
114 114
115 // If this API call is for a service worker, then this is the worker thread 115 // If this API call is for a service worker, then this is the worker thread
116 // id. Otherwise, this is -1. 116 // id. Otherwise, this is -1.
117 IPC_STRUCT_MEMBER(int, worker_thread_id) 117 IPC_STRUCT_MEMBER(int, worker_thread_id)
118 118
119 // If this API call is for a service worker, then this is the embedded 119 // If this API call is for a service worker, then this is the service
120 // worker id. Otherwise, this is -1. 120 // worker version id. Otherwise, this is -1.
121 IPC_STRUCT_MEMBER(int, embedded_worker_id) 121 IPC_STRUCT_MEMBER(int64_t, service_worker_version_id)
122 IPC_STRUCT_END() 122 IPC_STRUCT_END()
123 123
124 // Allows an extension to execute code in a tab. 124 // Allows an extension to execute code in a tab.
125 IPC_STRUCT_BEGIN(ExtensionMsg_ExecuteCode_Params) 125 IPC_STRUCT_BEGIN(ExtensionMsg_ExecuteCode_Params)
126 // The extension API request id, for responding. 126 // The extension API request id, for responding.
127 IPC_STRUCT_MEMBER(int, request_id) 127 IPC_STRUCT_MEMBER(int, request_id)
128 128
129 // The ID of the requesting injection host. 129 // The ID of the requesting injection host.
130 IPC_STRUCT_MEMBER(HostID, host_id) 130 IPC_STRUCT_MEMBER(HostID, host_id)
131 131
(...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after
880 880
881 // The browser sends this message in response to all service worker extension 881 // The browser sends this message in response to all service worker extension
882 // api calls. The response data (if any) is one of the base::Value subclasses, 882 // api calls. The response data (if any) is one of the base::Value subclasses,
883 // wrapped as the first element in a ListValue. 883 // wrapped as the first element in a ListValue.
884 IPC_MESSAGE_CONTROL5(ExtensionMsg_ResponseWorker, 884 IPC_MESSAGE_CONTROL5(ExtensionMsg_ResponseWorker,
885 int /* thread_id */, 885 int /* thread_id */,
886 int /* request_id */, 886 int /* request_id */,
887 bool /* success */, 887 bool /* success */,
888 base::ListValue /* response wrapper (see comment above) */, 888 base::ListValue /* response wrapper (see comment above) */,
889 std::string /* error */) 889 std::string /* error */)
890
891 // Asks the browser to increment the pending activity count for
Tom Sepez 2016/10/07 22:31:46 What happens browser-side if a compromised rendere
lazyboy 2016/10/07 23:16:59 This is expected to be unique, I've added a commen
892 // the worker with version id |service_worker_version_id|.
893 IPC_MESSAGE_CONTROL2(ExtensionHostMsg_IncrementServiceWorkerActivity,
894 int64_t /* service_worker_version_id */,
895 std::string /* request_uuid */)
896
897 // Asks the browser to decrement the pending activity count for
898 // the worker with version id |service_worker_version_id|.
899 IPC_MESSAGE_CONTROL2(ExtensionHostMsg_DecrementServiceWorkerActivity,
900 int64_t /* service_worker_version_id */,
901 std::string /* request_uuid */)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698