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

Side by Side Diff: extensions/common/extension_messages.h

Issue 1413543005: Use FrameTreeNode ID as frameId in extension APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Improve port lifetime management, add tests Created 5 years, 1 month 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 <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 // The ID of the extension that is the target of the request. 173 // The ID of the extension that is the target of the request.
174 IPC_STRUCT_MEMBER(std::string, target_id) 174 IPC_STRUCT_MEMBER(std::string, target_id)
175 175
176 // The ID of the extension that initiated the request. May be empty if it 176 // The ID of the extension that initiated the request. May be empty if it
177 // wasn't initiated by an extension. 177 // wasn't initiated by an extension.
178 IPC_STRUCT_MEMBER(std::string, source_id) 178 IPC_STRUCT_MEMBER(std::string, source_id)
179 179
180 // The URL of the frame that initiated the request. 180 // The URL of the frame that initiated the request.
181 IPC_STRUCT_MEMBER(GURL, source_url) 181 IPC_STRUCT_MEMBER(GURL, source_url)
182 182
183 // The ID of the tab that is the target of the request, or -1 if there is no
184 // target tab.
185 IPC_STRUCT_MEMBER(int, target_tab_id)
186
187 // The ID of the frame that is the target of the request, or -1 if there is
188 // no target frame (implying the message is for all frames).
189 IPC_STRUCT_MEMBER(int, target_frame_id)
190
191 // The process ID of the webview that initiated the request. 183 // The process ID of the webview that initiated the request.
192 IPC_STRUCT_MEMBER(int, guest_process_id) 184 IPC_STRUCT_MEMBER(int, guest_process_id)
193 185
194 // The render frame routing ID of the webview that initiated the request. 186 // The render frame routing ID of the webview that initiated the request.
195 IPC_STRUCT_MEMBER(int, guest_render_frame_routing_id) 187 IPC_STRUCT_MEMBER(int, guest_render_frame_routing_id)
196 IPC_STRUCT_END() 188 IPC_STRUCT_END()
197 189
198 IPC_STRUCT_TRAITS_BEGIN(extensions::DraggableRegion) 190 IPC_STRUCT_TRAITS_BEGIN(extensions::DraggableRegion)
199 IPC_STRUCT_TRAITS_MEMBER(draggable) 191 IPC_STRUCT_TRAITS_MEMBER(draggable)
200 IPC_STRUCT_TRAITS_MEMBER(bounds) 192 IPC_STRUCT_TRAITS_MEMBER(bounds)
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 int /* port_id */) 639 int /* port_id */)
648 640
649 IPC_SYNC_MESSAGE_CONTROL3_1(ExtensionHostMsg_OpenChannelToNativeApp, 641 IPC_SYNC_MESSAGE_CONTROL3_1(ExtensionHostMsg_OpenChannelToNativeApp,
650 int /* routing_id */, 642 int /* routing_id */,
651 std::string /* source_extension_id */, 643 std::string /* source_extension_id */,
652 std::string /* native_app_name */, 644 std::string /* native_app_name */,
653 int /* port_id */) 645 int /* port_id */)
654 646
655 // Get a port handle to the given tab. The handle can be used for sending 647 // Get a port handle to the given tab. The handle can be used for sending
656 // messages to the extension. 648 // messages to the extension.
657 IPC_SYNC_MESSAGE_CONTROL3_1(ExtensionHostMsg_OpenChannelToTab, 649 IPC_SYNC_MESSAGE_CONTROL4_1(ExtensionHostMsg_OpenChannelToTab,
650 int /* routing_id */,
658 ExtensionMsg_TabTargetConnectionInfo, 651 ExtensionMsg_TabTargetConnectionInfo,
659 std::string /* extension_id */, 652 std::string /* extension_id */,
660 std::string /* channel_name */, 653 std::string /* channel_name */,
661 int /* port_id */) 654 int /* port_id */)
662 655
656 // Sent in response to ExtensionMsg_DispatchOnConnect when the port is accepted.
657 // The handle is the value returned by ExtensionHostMsg_OpenChannelTo*.
658 IPC_MESSAGE_CONTROL2(ExtensionHostMsg_OpenMessagePort,
659 int /* routing_id */,
660 int /* port_id */);
661
662 // Sent in response to ExtensionMsg_DispatchOnConnect and whenever the port is
663 // closed. The handle is the value returned by ExtensionHostMsg_OpenChannelTo*.
664 IPC_MESSAGE_CONTROL3(ExtensionHostMsg_CloseMessagePort,
665 int /* routing_id */,
666 int /* port_id */,
667 bool /* force_close */);
668
663 // Send a message to an extension process. The handle is the value returned 669 // Send a message to an extension process. The handle is the value returned
664 // by ViewHostMsg_OpenChannelTo*. 670 // by ExtensionHostMsg_OpenChannelTo*.
665 IPC_MESSAGE_ROUTED2(ExtensionHostMsg_PostMessage, 671 IPC_MESSAGE_ROUTED2(ExtensionHostMsg_PostMessage,
666 int /* port_id */, 672 int /* port_id */,
667 extensions::Message) 673 extensions::Message)
668 674
669 // Send a message to an extension process. The handle is the value returned
670 // by ViewHostMsg_OpenChannelTo*.
671 IPC_MESSAGE_CONTROL2(ExtensionHostMsg_CloseChannel,
672 int /* port_id */,
673 std::string /* error_message */)
674
675 // Used to get the extension message bundle. 675 // Used to get the extension message bundle.
676 IPC_SYNC_MESSAGE_CONTROL1_1(ExtensionHostMsg_GetMessageBundle, 676 IPC_SYNC_MESSAGE_CONTROL1_1(ExtensionHostMsg_GetMessageBundle,
677 std::string /* extension id */, 677 std::string /* extension id */,
678 SubstitutionMap /* message bundle */) 678 SubstitutionMap /* message bundle */)
679 679
680 // Sent from the renderer to the browser to return the script running result. 680 // Sent from the renderer to the browser to return the script running result.
681 IPC_MESSAGE_ROUTED4( 681 IPC_MESSAGE_ROUTED4(
682 ExtensionHostMsg_ExecuteCodeFinished, 682 ExtensionHostMsg_ExecuteCodeFinished,
683 int /* request id */, 683 int /* request id */,
684 std::string /* error; empty implies success */, 684 std::string /* error; empty implies success */,
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
800 int /* acc_obj_id */, 800 int /* acc_obj_id */,
801 base::string16 /* selector */) 801 base::string16 /* selector */)
802 802
803 // Result of a query selector request. 803 // Result of a query selector request.
804 // result_acc_obj_id is the accessibility tree ID of the result element; 0 804 // result_acc_obj_id is the accessibility tree ID of the result element; 0
805 // indicates no result. 805 // indicates no result.
806 IPC_MESSAGE_ROUTED3(ExtensionHostMsg_AutomationQuerySelector_Result, 806 IPC_MESSAGE_ROUTED3(ExtensionHostMsg_AutomationQuerySelector_Result,
807 int /* request_id */, 807 int /* request_id */,
808 ExtensionHostMsg_AutomationQuerySelector_Error /* error */, 808 ExtensionHostMsg_AutomationQuerySelector_Error /* error */,
809 int /* result_acc_obj_id */) 809 int /* result_acc_obj_id */)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698