| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| 892 // the worker with version id |service_worker_version_id|. |
| 893 // Each request to increment must use unique |request_uuid|. If a request with |
| 894 // |request_uuid| is already in progress (due to race condition or renderer |
| 895 // compromise), browser process ignores the IPC. |
| 896 IPC_MESSAGE_CONTROL2(ExtensionHostMsg_IncrementServiceWorkerActivity, |
| 897 int64_t /* service_worker_version_id */, |
| 898 std::string /* request_uuid */) |
| 899 |
| 900 // Asks the browser to decrement the pending activity count for |
| 901 // the worker with version id |service_worker_version_id|. |
| 902 // |request_uuid| must match the GUID of a previous request, otherwise the |
| 903 // browser process ignores the IPC. |
| 904 IPC_MESSAGE_CONTROL2(ExtensionHostMsg_DecrementServiceWorkerActivity, |
| 905 int64_t /* service_worker_version_id */, |
| 906 std::string /* request_uuid */) |
| OLD | NEW |