summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
authormpcomplete@google.com <mpcomplete@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-01 21:17:49 +0000
committermpcomplete@google.com <mpcomplete@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-01 21:17:49 +0000
commit4b5d64ff3d7d95247ed4f078d8bf585a1726794d (patch)
tree050a523a5bbccf28ade0814b38bcc9bee187cd04 /chrome/common
parent912445b6db66140aecb3bc822075a6e9bb9d7e33 (diff)
downloadchromium_src-4b5d64ff3d7d95247ed4f078d8bf585a1726794d.zip
chromium_src-4b5d64ff3d7d95247ed4f078d8bf585a1726794d.tar.gz
chromium_src-4b5d64ff3d7d95247ed4f078d8bf585a1726794d.tar.bz2
Pass down the opener tab when a message channel is opened to an extension.
Also did a bunch of cleanup of ExtensionMessageService. I converted it to primarily UI-thread habitation, with one function that needs to be on the IO thread so it can handle a synchronous IPC message. TEST=N/A Review URL: http://codereview.chromium.org/99261 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15097 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r--chrome/common/render_messages_internal.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/chrome/common/render_messages_internal.h b/chrome/common/render_messages_internal.h
index 66f64b4..776fd44d 100644
--- a/chrome/common/render_messages_internal.h
+++ b/chrome/common/render_messages_internal.h
@@ -535,9 +535,11 @@ IPC_BEGIN_MESSAGES(View)
// Tell the extension process about a new channel that has been opened from a
// renderer. source_port_id identifies the port that the extension can
- // respond to.
- IPC_MESSAGE_CONTROL1(ViewMsg_ExtensionHandleConnect,
- int /* source_port_id */)
+ // respond to. tab_json is a JSON value for the tab that opened the
+ // connection, if any.
+ IPC_MESSAGE_CONTROL2(ViewMsg_ExtensionHandleConnect,
+ int /* source_port_id */,
+ std::string /* tab_json */)
// Send a javascript message to a renderer from the given port.
IPC_MESSAGE_CONTROL2(ViewMsg_ExtensionHandleMessage,
@@ -1339,15 +1341,16 @@ IPC_BEGIN_MESSAGES(ViewHost)
// Get a port handle to a currently-running extension process for the
// extension with the given ID. If no such extension is found, -1 is
// returned. The handle can be used for sending messages to the extension.
- IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_OpenChannelToExtension,
+ IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_OpenChannelToExtension,
+ int /* routing_id */,
std::string /* extension_id */,
int /* port_id */)
// Send a message to an extension process. The handle is the value returned
// by ViewHostMsg_OpenChannelToExtension.
- IPC_MESSAGE_CONTROL2(ViewHostMsg_ExtensionPostMessage,
- int /* port_id */,
- std::string /* message */)
+ IPC_MESSAGE_ROUTED2(ViewHostMsg_ExtensionPostMessage,
+ int /* port_id */,
+ std::string /* message */)
// Message to show a popup menu using native cocoa controls (Mac only).
IPC_MESSAGE_ROUTED1(ViewHostMsg_ShowPopup,