| 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.
|
|
|