| 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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 // The ID of the extension that is the target of the request. | 175 // The ID of the extension that is the target of the request. |
| 176 IPC_STRUCT_MEMBER(std::string, target_id) | 176 IPC_STRUCT_MEMBER(std::string, target_id) |
| 177 | 177 |
| 178 // The ID of the extension that initiated the request. May be empty if it | 178 // The ID of the extension that initiated the request. May be empty if it |
| 179 // wasn't initiated by an extension. | 179 // wasn't initiated by an extension. |
| 180 IPC_STRUCT_MEMBER(std::string, source_id) | 180 IPC_STRUCT_MEMBER(std::string, source_id) |
| 181 | 181 |
| 182 // The URL of the frame that initiated the request. | 182 // The URL of the frame that initiated the request. |
| 183 IPC_STRUCT_MEMBER(GURL, source_url) | 183 IPC_STRUCT_MEMBER(GURL, source_url) |
| 184 | 184 |
| 185 // The ID of the tab that is the target of the request, or -1 if there is no | |
| 186 // target tab. | |
| 187 IPC_STRUCT_MEMBER(int, target_tab_id) | |
| 188 | |
| 189 // The ID of the frame that is the target of the request, or -1 if there is | |
| 190 // no target frame (implying the message is for all frames). | |
| 191 IPC_STRUCT_MEMBER(int, target_frame_id) | |
| 192 | |
| 193 // The process ID of the webview that initiated the request. | 185 // The process ID of the webview that initiated the request. |
| 194 IPC_STRUCT_MEMBER(int, guest_process_id) | 186 IPC_STRUCT_MEMBER(int, guest_process_id) |
| 195 | 187 |
| 196 // The render frame routing ID of the webview that initiated the request. | 188 // The render frame routing ID of the webview that initiated the request. |
| 197 IPC_STRUCT_MEMBER(int, guest_render_frame_routing_id) | 189 IPC_STRUCT_MEMBER(int, guest_render_frame_routing_id) |
| 198 IPC_STRUCT_END() | 190 IPC_STRUCT_END() |
| 199 | 191 |
| 200 IPC_STRUCT_TRAITS_BEGIN(extensions::DraggableRegion) | 192 IPC_STRUCT_TRAITS_BEGIN(extensions::DraggableRegion) |
| 201 IPC_STRUCT_TRAITS_MEMBER(draggable) | 193 IPC_STRUCT_TRAITS_MEMBER(draggable) |
| 202 IPC_STRUCT_TRAITS_MEMBER(bounds) | 194 IPC_STRUCT_TRAITS_MEMBER(bounds) |
| (...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 635 bool /* lazy */) | 627 bool /* lazy */) |
| 636 | 628 |
| 637 // Notify the browser that an event has finished being dispatched. | 629 // Notify the browser that an event has finished being dispatched. |
| 638 IPC_MESSAGE_ROUTED1(ExtensionHostMsg_EventAck, int /* message_id */) | 630 IPC_MESSAGE_ROUTED1(ExtensionHostMsg_EventAck, int /* message_id */) |
| 639 | 631 |
| 640 // Open a channel to all listening contexts owned by the extension with | 632 // Open a channel to all listening contexts owned by the extension with |
| 641 // the given ID. This always returns a valid port ID which can be used for | 633 // the given ID. This always returns a valid port ID which can be used for |
| 642 // sending messages. If an error occurred, the opener will be notified | 634 // sending messages. If an error occurred, the opener will be notified |
| 643 // asynchronously. | 635 // asynchronously. |
| 644 IPC_SYNC_MESSAGE_CONTROL4_1(ExtensionHostMsg_OpenChannelToExtension, | 636 IPC_SYNC_MESSAGE_CONTROL4_1(ExtensionHostMsg_OpenChannelToExtension, |
| 645 int /* routing_id */, | 637 int /* frame_routing_id */, |
| 646 ExtensionMsg_ExternalConnectionInfo, | 638 ExtensionMsg_ExternalConnectionInfo, |
| 647 std::string /* channel_name */, | 639 std::string /* channel_name */, |
| 648 bool /* include_tls_channel_id */, | 640 bool /* include_tls_channel_id */, |
| 649 int /* port_id */) | 641 int /* port_id */) |
| 650 | 642 |
| 651 IPC_SYNC_MESSAGE_CONTROL3_1(ExtensionHostMsg_OpenChannelToNativeApp, | 643 IPC_SYNC_MESSAGE_CONTROL3_1(ExtensionHostMsg_OpenChannelToNativeApp, |
| 652 int /* routing_id */, | 644 int /* frame_routing_id */, |
| 653 std::string /* source_extension_id */, | 645 std::string /* source_extension_id */, |
| 654 std::string /* native_app_name */, | 646 std::string /* native_app_name */, |
| 655 int /* port_id */) | 647 int /* port_id */) |
| 656 | 648 |
| 657 // Get a port handle to the given tab. The handle can be used for sending | 649 // Get a port handle to the given tab. The handle can be used for sending |
| 658 // messages to the extension. | 650 // messages to the extension. |
| 659 IPC_SYNC_MESSAGE_CONTROL3_1(ExtensionHostMsg_OpenChannelToTab, | 651 IPC_SYNC_MESSAGE_CONTROL4_1(ExtensionHostMsg_OpenChannelToTab, |
| 652 int /* frame_routing_id */, |
| 660 ExtensionMsg_TabTargetConnectionInfo, | 653 ExtensionMsg_TabTargetConnectionInfo, |
| 661 std::string /* extension_id */, | 654 std::string /* extension_id */, |
| 662 std::string /* channel_name */, | 655 std::string /* channel_name */, |
| 663 int /* port_id */) | 656 int /* port_id */) |
| 664 | 657 |
| 658 // Sent in response to ExtensionMsg_DispatchOnConnect when the port is accepted. |
| 659 // The handle is the value returned by ExtensionHostMsg_OpenChannelTo*. |
| 660 IPC_MESSAGE_CONTROL2(ExtensionHostMsg_OpenMessagePort, |
| 661 int /* frame_routing_id */, |
| 662 int /* port_id */); |
| 663 |
| 664 // Sent in response to ExtensionMsg_DispatchOnConnect and whenever the port is |
| 665 // closed. The handle is the value returned by ExtensionHostMsg_OpenChannelTo*. |
| 666 IPC_MESSAGE_CONTROL3(ExtensionHostMsg_CloseMessagePort, |
| 667 int /* frame_routing_id */, |
| 668 int /* port_id */, |
| 669 bool /* force_close */); |
| 670 |
| 665 // Send a message to an extension process. The handle is the value returned | 671 // Send a message to an extension process. The handle is the value returned |
| 666 // by ViewHostMsg_OpenChannelTo*. | 672 // by ExtensionHostMsg_OpenChannelTo*. |
| 667 IPC_MESSAGE_ROUTED2(ExtensionHostMsg_PostMessage, | 673 IPC_MESSAGE_ROUTED2(ExtensionHostMsg_PostMessage, |
| 668 int /* port_id */, | 674 int /* port_id */, |
| 669 extensions::Message) | 675 extensions::Message) |
| 670 | 676 |
| 671 // Send a message to an extension process. The handle is the value returned | |
| 672 // by ViewHostMsg_OpenChannelTo*. | |
| 673 IPC_MESSAGE_CONTROL2(ExtensionHostMsg_CloseChannel, | |
| 674 int /* port_id */, | |
| 675 std::string /* error_message */) | |
| 676 | |
| 677 // Used to get the extension message bundle. | 677 // Used to get the extension message bundle. |
| 678 IPC_SYNC_MESSAGE_CONTROL1_1(ExtensionHostMsg_GetMessageBundle, | 678 IPC_SYNC_MESSAGE_CONTROL1_1(ExtensionHostMsg_GetMessageBundle, |
| 679 std::string /* extension id */, | 679 std::string /* extension id */, |
| 680 SubstitutionMap /* message bundle */) | 680 SubstitutionMap /* message bundle */) |
| 681 | 681 |
| 682 // Sent from the renderer to the browser to return the script running result. | 682 // Sent from the renderer to the browser to return the script running result. |
| 683 IPC_MESSAGE_ROUTED4( | 683 IPC_MESSAGE_ROUTED4( |
| 684 ExtensionHostMsg_ExecuteCodeFinished, | 684 ExtensionHostMsg_ExecuteCodeFinished, |
| 685 int /* request id */, | 685 int /* request id */, |
| 686 std::string /* error; empty implies success */, | 686 std::string /* error; empty implies success */, |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 802 int /* acc_obj_id */, | 802 int /* acc_obj_id */, |
| 803 base::string16 /* selector */) | 803 base::string16 /* selector */) |
| 804 | 804 |
| 805 // Result of a query selector request. | 805 // Result of a query selector request. |
| 806 // result_acc_obj_id is the accessibility tree ID of the result element; 0 | 806 // result_acc_obj_id is the accessibility tree ID of the result element; 0 |
| 807 // indicates no result. | 807 // indicates no result. |
| 808 IPC_MESSAGE_ROUTED3(ExtensionHostMsg_AutomationQuerySelector_Result, | 808 IPC_MESSAGE_ROUTED3(ExtensionHostMsg_AutomationQuerySelector_Result, |
| 809 int /* request_id */, | 809 int /* request_id */, |
| 810 ExtensionHostMsg_AutomationQuerySelector_Error /* error */, | 810 ExtensionHostMsg_AutomationQuerySelector_Error /* error */, |
| 811 int /* result_acc_obj_id */) | 811 int /* result_acc_obj_id */) |
| OLD | NEW |