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

Unified Diff: chrome/common/extensions/extension_messages.h

Issue 14301016: Fix a couple of bugs relating to sending Tab info with chrome.runtime.connect and (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add key to app1/manifest.json Created 7 years, 8 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/extensions/api/runtime.json ('k') | chrome/renderer/chrome_mock_render_thread.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/extension_messages.h
diff --git a/chrome/common/extensions/extension_messages.h b/chrome/common/extensions/extension_messages.h
index 62af07adbfcc14835dae5ead7bb8ea0ec20f569e..5891240593c890e99ad7ce550fc14eccbc972b7b 100644
--- a/chrome/common/extensions/extension_messages.h
+++ b/chrome/common/extensions/extension_messages.h
@@ -122,6 +122,20 @@ IPC_STRUCT_BEGIN(ExtensionMsg_ExecuteCode_Params)
IPC_STRUCT_MEMBER(bool, is_web_view)
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)
+ // The ID of the extension that is the target of the request.
+ IPC_STRUCT_MEMBER(std::string, target_id)
+
+ // The ID of the extension that initiated the request. May be empty if it
+ // wasn't initiated by an extension.
+ IPC_STRUCT_MEMBER(std::string, source_id)
+
+ // The URL of the frame that initiated the request.
+ IPC_STRUCT_MEMBER(GURL, source_url)
+IPC_STRUCT_END()
+
IPC_STRUCT_TRAITS_BEGIN(WebApplicationInfo::IconInfo)
IPC_STRUCT_TRAITS_MEMBER(url)
IPC_STRUCT_TRAITS_MEMBER(width)
@@ -396,12 +410,11 @@ IPC_MESSAGE_ROUTED2(ExtensionMsg_GetAppInstallStateResponse,
int32 /* callback_id */)
// Dispatch the Port.onConnect event for message channels.
-IPC_MESSAGE_ROUTED5(ExtensionMsg_DispatchOnConnect,
+IPC_MESSAGE_ROUTED4(ExtensionMsg_DispatchOnConnect,
int /* target_port_id */,
std::string /* channel_name */,
- std::string /* tab_json */,
- std::string /* source_extension_id */,
- std::string /* target_extension_id */)
+ DictionaryValue /* source_tab */,
+ ExtensionMsg_ExternalConnectionInfo)
// Deliver a message sent with ExtensionHostMsg_PostMessage.
IPC_MESSAGE_ROUTED2(ExtensionMsg_DeliverMessage,
@@ -491,10 +504,9 @@ IPC_MESSAGE_ROUTED0(ExtensionHostMsg_EventAck)
// the given ID. This always returns a valid port ID which can be used for
// sending messages. If an error occurred, the opener will be notified
// asynchronously.
-IPC_SYNC_MESSAGE_CONTROL4_1(ExtensionHostMsg_OpenChannelToExtension,
+IPC_SYNC_MESSAGE_CONTROL3_1(ExtensionHostMsg_OpenChannelToExtension,
int /* routing_id */,
- std::string /* source_extension_id */,
- std::string /* target_extension_id */,
+ ExtensionMsg_ExternalConnectionInfo,
std::string /* channel_name */,
int /* port_id */)
@@ -531,14 +543,13 @@ IPC_SYNC_MESSAGE_CONTROL1_1(ExtensionHostMsg_GetMessageBundle,
SubstitutionMap /* message bundle */)
// Sent from the renderer to the browser to return the script running result.
-IPC_MESSAGE_ROUTED5(ExtensionHostMsg_ExecuteCodeFinished,
- int /* request id */,
- std::string /* error; empty implies success */,
- int32 /* page_id the code executed on.
- May be -1 if unsuccessful */,
- GURL /* URL of the code executed on.
- May be empty if unsuccessful. */,
- ListValue /* result of the script */)
+IPC_MESSAGE_ROUTED5(
+ ExtensionHostMsg_ExecuteCodeFinished,
+ int /* request id */,
+ std::string /* error; empty implies success */,
+ int32 /* page_id the code executed on. May be -1 if unsuccessful */,
+ GURL /* URL of the code executed on. May be empty if unsuccessful. */,
+ ListValue /* result of the script */)
// Sent from the renderer to the browser to notify that content scripts are
// running in the renderer that the IPC originated from.
« no previous file with comments | « chrome/common/extensions/api/runtime.json ('k') | chrome/renderer/chrome_mock_render_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698