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

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

Issue 709933002: Add frameId to MessageSender (extension messaging API) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Generate frameId in browser Created 6 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 // are examples of when this will be false. 140 // are examples of when this will be false.
141 IPC_STRUCT_MEMBER(bool, wants_result) 141 IPC_STRUCT_MEMBER(bool, wants_result)
142 142
143 // The URL of the file that was injected, if any. 143 // The URL of the file that was injected, if any.
144 IPC_STRUCT_MEMBER(GURL, file_url) 144 IPC_STRUCT_MEMBER(GURL, file_url)
145 145
146 // Whether the code to be executed should be associated with a user gesture. 146 // Whether the code to be executed should be associated with a user gesture.
147 IPC_STRUCT_MEMBER(bool, user_gesture) 147 IPC_STRUCT_MEMBER(bool, user_gesture)
148 IPC_STRUCT_END() 148 IPC_STRUCT_END()
149 149
150 // Struct containing information about the sender of connect() calls that
151 // originate from a tab.
152 IPC_STRUCT_BEGIN(ExtensionMsg_TabConnectionInfo)
153 // The tab from where the connection was created.
154 IPC_STRUCT_MEMBER(base::DictionaryValue, tab)
155
156 // The ID of the frame that initiated the connection.
157 // 0 if main frame, positive otherwise. -1 if not initiated from a frame.
158 IPC_STRUCT_MEMBER(int, frame_id)
159 IPC_STRUCT_END()
160
150 // Struct containing the data for external connections to extensions. Used to 161 // Struct containing the data for external connections to extensions. Used to
151 // handle the IPCs initiated by both connect() and onConnect(). 162 // handle the IPCs initiated by both connect() and onConnect().
152 IPC_STRUCT_BEGIN(ExtensionMsg_ExternalConnectionInfo) 163 IPC_STRUCT_BEGIN(ExtensionMsg_ExternalConnectionInfo)
153 // The ID of the extension that is the target of the request. 164 // The ID of the extension that is the target of the request.
154 IPC_STRUCT_MEMBER(std::string, target_id) 165 IPC_STRUCT_MEMBER(std::string, target_id)
155 166
156 // The ID of the extension that initiated the request. May be empty if it 167 // The ID of the extension that initiated the request. May be empty if it
157 // wasn't initiated by an extension. 168 // wasn't initiated by an extension.
158 IPC_STRUCT_MEMBER(std::string, source_id) 169 IPC_STRUCT_MEMBER(std::string, source_id)
159 170
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 // The browser changed its mind about suspending this extension. 488 // The browser changed its mind about suspending this extension.
478 IPC_MESSAGE_CONTROL1(ExtensionMsg_CancelSuspend, 489 IPC_MESSAGE_CONTROL1(ExtensionMsg_CancelSuspend,
479 std::string /* extension_id */) 490 std::string /* extension_id */)
480 491
481 // Response to the renderer for ExtensionHostMsg_GetAppInstallState. 492 // Response to the renderer for ExtensionHostMsg_GetAppInstallState.
482 IPC_MESSAGE_ROUTED2(ExtensionMsg_GetAppInstallStateResponse, 493 IPC_MESSAGE_ROUTED2(ExtensionMsg_GetAppInstallStateResponse,
483 std::string /* state */, 494 std::string /* state */,
484 int32 /* callback_id */) 495 int32 /* callback_id */)
485 496
486 // Dispatch the Port.onConnect event for message channels. 497 // Dispatch the Port.onConnect event for message channels.
487 IPC_MESSAGE_ROUTED5(ExtensionMsg_DispatchOnConnect, 498 IPC_MESSAGE_ROUTED5(ExtensionMsg_DispatchOnConnect,
not at google - send to devlin 2014/11/11 00:03:04 It is actually more standard to just pull all of t
488 int /* target_port_id */, 499 int /* target_port_id */,
489 std::string /* channel_name */, 500 std::string /* channel_name */,
490 base::DictionaryValue /* source_tab */, 501 ExtensionMsg_TabConnectionInfo /* source */,
491 ExtensionMsg_ExternalConnectionInfo, 502 ExtensionMsg_ExternalConnectionInfo,
492 std::string /* tls_channel_id */) 503 std::string /* tls_channel_id */)
493 504
494 // Deliver a message sent with ExtensionHostMsg_PostMessage. 505 // Deliver a message sent with ExtensionHostMsg_PostMessage.
495 IPC_MESSAGE_ROUTED2(ExtensionMsg_DeliverMessage, 506 IPC_MESSAGE_ROUTED2(ExtensionMsg_DeliverMessage,
496 int /* target_port_id */, 507 int /* target_port_id */,
497 extensions::Message) 508 extensions::Message)
498 509
499 // Dispatch the Port.onDisconnect event for message channels. 510 // Dispatch the Port.onDisconnect event for message channels.
500 IPC_MESSAGE_ROUTED2(ExtensionMsg_DispatchOnDisconnect, 511 IPC_MESSAGE_ROUTED2(ExtensionMsg_DispatchOnDisconnect,
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
774 int /* acc_obj_id */, 785 int /* acc_obj_id */,
775 base::string16 /* selector */) 786 base::string16 /* selector */)
776 787
777 // Result of a query selector request. 788 // Result of a query selector request.
778 // result_acc_obj_id is the accessibility tree ID of the result element; 0 789 // result_acc_obj_id is the accessibility tree ID of the result element; 0
779 // indicates no result. 790 // indicates no result.
780 IPC_MESSAGE_ROUTED3(ExtensionHostMsg_AutomationQuerySelector_Result, 791 IPC_MESSAGE_ROUTED3(ExtensionHostMsg_AutomationQuerySelector_Result,
781 int /* request_id */, 792 int /* request_id */,
782 ExtensionHostMsg_AutomationQuerySelector_Error /* error */, 793 ExtensionHostMsg_AutomationQuerySelector_Error /* error */,
783 int /* result_acc_obj_id */) 794 int /* result_acc_obj_id */)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698