summaryrefslogtreecommitdiffstats
path: root/extensions/common/extension_messages.h
diff options
context:
space:
mode:
authorrob <rob@robwu.nl>2014-12-09 16:16:04 -0800
committerCommit bot <commit-bot@chromium.org>2014-12-10 00:16:23 +0000
commit4ae97b7b61308ab58413c135b4ed70955b698335 (patch)
tree5e3861e783d5e6e25f6364c90cea74fe0089a5f6 /extensions/common/extension_messages.h
parent6040ce4733965bd1215b9be7292dac67f035bbed (diff)
downloadchromium_src-4ae97b7b61308ab58413c135b4ed70955b698335.zip
chromium_src-4ae97b7b61308ab58413c135b4ed70955b698335.tar.gz
chromium_src-4ae97b7b61308ab58413c135b4ed70955b698335.tar.bz2
Add frameId option to chrome.tabs.connect and chrome.tabs.sendMessage.
BUG=264286 R=kalman@chromium.org,tsepez@chromium.org,sky@chromium.org TEST=browser_tests ExtensionApiTest.Messaging Review URL: https://codereview.chromium.org/758443002 Cr-Commit-Position: refs/heads/master@{#307592}
Diffstat (limited to 'extensions/common/extension_messages.h')
-rw-r--r--extensions/common/extension_messages.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/extensions/common/extension_messages.h b/extensions/common/extension_messages.h
index f388cf1..b3d662d 100644
--- a/extensions/common/extension_messages.h
+++ b/extensions/common/extension_messages.h
@@ -158,6 +158,16 @@ IPC_STRUCT_BEGIN(ExtensionMsg_TabConnectionInfo)
IPC_STRUCT_MEMBER(int, frame_id)
IPC_STRUCT_END()
+// Struct containing information about the destination of tab.connect().
+IPC_STRUCT_BEGIN(ExtensionMsg_TabTargetConnectionInfo)
+ // The destination tab's ID.
+ IPC_STRUCT_MEMBER(int, tab_id)
+
+ // Frame ID of the destination. -1 for all frames, 0 for main frame and
+ // positive if the destination is a specific child frame.
+ IPC_STRUCT_MEMBER(int, frame_id)
+IPC_STRUCT_END()
+
// Struct containing the data for external connections to extensions. Used to
// handle the IPCs initiated by both connect() and onConnect().
IPC_STRUCT_BEGIN(ExtensionMsg_ExternalConnectionInfo)
@@ -170,6 +180,9 @@ IPC_STRUCT_BEGIN(ExtensionMsg_ExternalConnectionInfo)
// The URL of the frame that initiated the request.
IPC_STRUCT_MEMBER(GURL, source_url)
+
+ // The ID of the frame that is the target of the request.
+ IPC_STRUCT_MEMBER(int, target_frame_id)
IPC_STRUCT_END()
IPC_STRUCT_TRAITS_BEGIN(extensions::DraggableRegion)
@@ -632,7 +645,7 @@ IPC_SYNC_MESSAGE_CONTROL3_1(ExtensionHostMsg_OpenChannelToNativeApp,
// messages to the extension.
IPC_SYNC_MESSAGE_CONTROL4_1(ExtensionHostMsg_OpenChannelToTab,
int /* routing_id */,
- int /* tab_id */,
+ ExtensionMsg_TabTargetConnectionInfo,
std::string /* extension_id */,
std::string /* channel_name */,
int /* port_id */)