| 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 service | 119 // If this API call is for a service worker, then this is the service |
| 120 // worker version id. Otherwise, this is -1. | 120 // worker version id. Otherwise, this is -1. |
| 121 IPC_STRUCT_MEMBER(int64_t, service_worker_version_id) | 121 IPC_STRUCT_MEMBER(int64_t, service_worker_version_id) |
| 122 IPC_STRUCT_END() | 122 IPC_STRUCT_END() |
| 123 | 123 |
| 124 IPC_STRUCT_BEGIN(ExtensionMsg_DispatchEvent_Params) |
| 125 // The id of the extension to dispatch the event to. |
| 126 IPC_STRUCT_MEMBER(std::string, extension_id) |
| 127 |
| 128 // The name of the event to dispatch. |
| 129 IPC_STRUCT_MEMBER(std::string, event_name) |
| 130 |
| 131 // The id of the event for use in the EventAck response message. |
| 132 IPC_STRUCT_MEMBER(int, event_id) |
| 133 |
| 134 // Whether or not the event is part of a user gesture. |
| 135 IPC_STRUCT_MEMBER(bool, is_user_gesture) |
| 136 |
| 137 // Additional filtering info for the event. |
| 138 IPC_STRUCT_MEMBER(base::DictionaryValue, filtering_info) |
| 139 IPC_STRUCT_END() |
| 140 |
| 124 // Allows an extension to execute code in a tab. | 141 // Allows an extension to execute code in a tab. |
| 125 IPC_STRUCT_BEGIN(ExtensionMsg_ExecuteCode_Params) | 142 IPC_STRUCT_BEGIN(ExtensionMsg_ExecuteCode_Params) |
| 126 // The extension API request id, for responding. | 143 // The extension API request id, for responding. |
| 127 IPC_STRUCT_MEMBER(int, request_id) | 144 IPC_STRUCT_MEMBER(int, request_id) |
| 128 | 145 |
| 129 // The ID of the requesting injection host. | 146 // The ID of the requesting injection host. |
| 130 IPC_STRUCT_MEMBER(HostID, host_id) | 147 IPC_STRUCT_MEMBER(HostID, host_id) |
| 131 | 148 |
| 132 // Whether the code is JavaScript or CSS. | 149 // Whether the code is JavaScript or CSS. |
| 133 IPC_STRUCT_MEMBER(bool, is_javascript) | 150 IPC_STRUCT_MEMBER(bool, is_javascript) |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 427 | 444 |
| 428 // The browser sends this message in response to all extension api calls. The | 445 // The browser sends this message in response to all extension api calls. The |
| 429 // response data (if any) is one of the base::Value subclasses, wrapped as the | 446 // response data (if any) is one of the base::Value subclasses, wrapped as the |
| 430 // first element in a ListValue. | 447 // first element in a ListValue. |
| 431 IPC_MESSAGE_ROUTED4(ExtensionMsg_Response, | 448 IPC_MESSAGE_ROUTED4(ExtensionMsg_Response, |
| 432 int /* request_id */, | 449 int /* request_id */, |
| 433 bool /* success */, | 450 bool /* success */, |
| 434 base::ListValue /* response wrapper (see comment above) */, | 451 base::ListValue /* response wrapper (see comment above) */, |
| 435 std::string /* error */) | 452 std::string /* error */) |
| 436 | 453 |
| 454 // Sent to the renderer to dispatch an event to an extension. |
| 455 // Note: |event_args| is separate from the params to avoid having the message |
| 456 // take ownership. |
| 457 IPC_MESSAGE_CONTROL2(ExtensionMsg_DispatchEvent, |
| 458 ExtensionMsg_DispatchEvent_Params /* params */, |
| 459 base::ListValue /* event_args */) |
| 460 |
| 437 // This message is optionally routed. If used as a control message, it will | 461 // This message is optionally routed. If used as a control message, it will |
| 438 // call a javascript function |function_name| from module |module_name| in | 462 // call a javascript function |function_name| from module |module_name| in |
| 439 // every registered context in the target process. If routed, it will be | 463 // every registered context in the target process. If routed, it will be |
| 440 // restricted to the contexts that are part of the target RenderView. | 464 // restricted to the contexts that are part of the target RenderView. |
| 441 // | 465 // |
| 442 // If |extension_id| is non-empty, the function will be invoked only in | 466 // If |extension_id| is non-empty, the function will be invoked only in |
| 443 // contexts owned by the extension. |args| is a list of primitive Value types | 467 // contexts owned by the extension. |args| is a list of primitive Value types |
| 444 // that are passed to the function. | 468 // that are passed to the function. |
| 445 IPC_MESSAGE_ROUTED5(ExtensionMsg_MessageInvoke, | 469 IPC_MESSAGE_ROUTED4(ExtensionMsg_MessageInvoke, |
| 446 std::string /* extension_id */, | 470 std::string /* extension_id */, |
| 447 std::string /* module_name */, | 471 std::string /* module_name */, |
| 448 std::string /* function_name */, | 472 std::string /* function_name */, |
| 449 base::ListValue /* args */, | 473 base::ListValue /* args */) |
| 450 bool /* delivered as part of a user gesture */) | |
| 451 | 474 |
| 452 // Set the top-level frame to the provided name. | 475 // Set the top-level frame to the provided name. |
| 453 IPC_MESSAGE_ROUTED1(ExtensionMsg_SetFrameName, | 476 IPC_MESSAGE_ROUTED1(ExtensionMsg_SetFrameName, |
| 454 std::string /* frame_name */) | 477 std::string /* frame_name */) |
| 455 | 478 |
| 456 // Tell the renderer process the platforms system font. | 479 // Tell the renderer process the platforms system font. |
| 457 IPC_MESSAGE_CONTROL2(ExtensionMsg_SetSystemFont, | 480 IPC_MESSAGE_CONTROL2(ExtensionMsg_SetSystemFont, |
| 458 std::string /* font_family */, | 481 std::string /* font_family */, |
| 459 std::string /* font_size */) | 482 std::string /* font_size */) |
| 460 | 483 |
| (...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 894 int64_t /* service_worker_version_id */, | 917 int64_t /* service_worker_version_id */, |
| 895 std::string /* request_uuid */) | 918 std::string /* request_uuid */) |
| 896 | 919 |
| 897 // Asks the browser to decrement the pending activity count for | 920 // Asks the browser to decrement the pending activity count for |
| 898 // the worker with version id |service_worker_version_id|. | 921 // the worker with version id |service_worker_version_id|. |
| 899 // |request_uuid| must match the GUID of a previous request, otherwise the | 922 // |request_uuid| must match the GUID of a previous request, otherwise the |
| 900 // browser process ignores the IPC. | 923 // browser process ignores the IPC. |
| 901 IPC_MESSAGE_CONTROL2(ExtensionHostMsg_DecrementServiceWorkerActivity, | 924 IPC_MESSAGE_CONTROL2(ExtensionHostMsg_DecrementServiceWorkerActivity, |
| 902 int64_t /* service_worker_version_id */, | 925 int64_t /* service_worker_version_id */, |
| 903 std::string /* request_uuid */) | 926 std::string /* request_uuid */) |
| OLD | NEW |