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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 IPC_STRUCT_MEMBER(int, source_tab_id) | 99 IPC_STRUCT_MEMBER(int, source_tab_id) |
100 | 100 |
101 // Unique request id to match requests and responses. | 101 // Unique request id to match requests and responses. |
102 IPC_STRUCT_MEMBER(int, request_id) | 102 IPC_STRUCT_MEMBER(int, request_id) |
103 | 103 |
104 // True if request has a callback specified. | 104 // True if request has a callback specified. |
105 IPC_STRUCT_MEMBER(bool, has_callback) | 105 IPC_STRUCT_MEMBER(bool, has_callback) |
106 | 106 |
107 // True if request is executed in response to an explicit user gesture. | 107 // True if request is executed in response to an explicit user gesture. |
108 IPC_STRUCT_MEMBER(bool, user_gesture) | 108 IPC_STRUCT_MEMBER(bool, user_gesture) |
| 109 |
| 110 // If this API call is for a service worker, then this is the worker thread |
| 111 // id. Otherwise, this is -1. |
| 112 IPC_STRUCT_MEMBER(int, worker_thread_id) |
| 113 |
| 114 // If this API call is for a service worker, then this is the embedded |
| 115 // worker id. Otherwise, this is -1. |
| 116 IPC_STRUCT_MEMBER(int, embedded_worker_id) |
109 IPC_STRUCT_END() | 117 IPC_STRUCT_END() |
110 | 118 |
111 // Allows an extension to execute code in a tab. | 119 // Allows an extension to execute code in a tab. |
112 IPC_STRUCT_BEGIN(ExtensionMsg_ExecuteCode_Params) | 120 IPC_STRUCT_BEGIN(ExtensionMsg_ExecuteCode_Params) |
113 // The extension API request id, for responding. | 121 // The extension API request id, for responding. |
114 IPC_STRUCT_MEMBER(int, request_id) | 122 IPC_STRUCT_MEMBER(int, request_id) |
115 | 123 |
116 // The ID of the requesting injection host. | 124 // The ID of the requesting injection host. |
117 IPC_STRUCT_MEMBER(HostID, host_id) | 125 IPC_STRUCT_MEMBER(HostID, host_id) |
118 | 126 |
(...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
831 int /* acc_obj_id */, | 839 int /* acc_obj_id */, |
832 base::string16 /* selector */) | 840 base::string16 /* selector */) |
833 | 841 |
834 // Result of a query selector request. | 842 // Result of a query selector request. |
835 // result_acc_obj_id is the accessibility tree ID of the result element; 0 | 843 // result_acc_obj_id is the accessibility tree ID of the result element; 0 |
836 // indicates no result. | 844 // indicates no result. |
837 IPC_MESSAGE_ROUTED3(ExtensionHostMsg_AutomationQuerySelector_Result, | 845 IPC_MESSAGE_ROUTED3(ExtensionHostMsg_AutomationQuerySelector_Result, |
838 int /* request_id */, | 846 int /* request_id */, |
839 ExtensionHostMsg_AutomationQuerySelector_Error /* error */, | 847 ExtensionHostMsg_AutomationQuerySelector_Error /* error */, |
840 int /* result_acc_obj_id */) | 848 int /* result_acc_obj_id */) |
| 849 |
| 850 // Messages related to Extension Service Worker. |
| 851 #undef IPC_MESSAGE_START |
| 852 #define IPC_MESSAGE_START ExtensionWorkerMsgStart |
| 853 // A service worker thread sends this message when an extension service worker |
| 854 // starts an API request. The browser will always respond with a |
| 855 // ExtensionMsg_ResponseWorker. |
| 856 IPC_MESSAGE_CONTROL1(ExtensionHostMsg_RequestWorker, |
| 857 ExtensionHostMsg_Request_Params) |
| 858 |
| 859 // The browser sends this message in response to all service worker extension |
| 860 // api calls. The response data (if any) is one of the base::Value subclasses, |
| 861 // wrapped as the first element in a ListValue. |
| 862 IPC_MESSAGE_CONTROL5(ExtensionMsg_ResponseWorker, |
| 863 int /* thread_id */, |
| 864 int /* request_id */, |
| 865 bool /* success */, |
| 866 base::ListValue /* response wrapper (see comment above) */, |
| 867 std::string /* error */) |
OLD | NEW |