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

Unified Diff: extensions/common/extension_messages.h

Issue 1413543005: Use FrameTreeNode ID as frameId in extension APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: s/:/ / Created 4 years, 11 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
Index: extensions/common/extension_messages.h
diff --git a/extensions/common/extension_messages.h b/extensions/common/extension_messages.h
index ce8f25178d31abdf2c53eb3b0e69da8edb138063..6ff3cf1d83f65b7fb2fdb15e4620db93b649536b 100644
--- a/extensions/common/extension_messages.h
+++ b/extensions/common/extension_messages.h
@@ -182,14 +182,6 @@ IPC_STRUCT_BEGIN(ExtensionMsg_ExternalConnectionInfo)
// The URL of the frame that initiated the request.
IPC_STRUCT_MEMBER(GURL, source_url)
- // The ID of the tab that is the target of the request, or -1 if there is no
- // target tab.
- IPC_STRUCT_MEMBER(int, target_tab_id)
-
- // The ID of the frame that is the target of the request, or -1 if there is
- // no target frame (implying the message is for all frames).
- IPC_STRUCT_MEMBER(int, target_frame_id)
-
// The process ID of the webview that initiated the request.
IPC_STRUCT_MEMBER(int, guest_process_id)
@@ -642,38 +634,46 @@ IPC_MESSAGE_ROUTED1(ExtensionHostMsg_EventAck, int /* message_id */)
// sending messages. If an error occurred, the opener will be notified
// asynchronously.
IPC_SYNC_MESSAGE_CONTROL4_1(ExtensionHostMsg_OpenChannelToExtension,
- int /* routing_id */,
+ int /* frame_routing_id */,
ExtensionMsg_ExternalConnectionInfo,
std::string /* channel_name */,
bool /* include_tls_channel_id */,
int /* port_id */)
IPC_SYNC_MESSAGE_CONTROL3_1(ExtensionHostMsg_OpenChannelToNativeApp,
- int /* routing_id */,
+ int /* frame_routing_id */,
std::string /* source_extension_id */,
std::string /* native_app_name */,
int /* port_id */)
// Get a port handle to the given tab. The handle can be used for sending
// messages to the extension.
-IPC_SYNC_MESSAGE_CONTROL3_1(ExtensionHostMsg_OpenChannelToTab,
+IPC_SYNC_MESSAGE_CONTROL4_1(ExtensionHostMsg_OpenChannelToTab,
+ int /* frame_routing_id */,
ExtensionMsg_TabTargetConnectionInfo,
std::string /* extension_id */,
std::string /* channel_name */,
int /* port_id */)
+// Sent in response to ExtensionMsg_DispatchOnConnect when the port is accepted.
+// The handle is the value returned by ExtensionHostMsg_OpenChannelTo*.
+IPC_MESSAGE_CONTROL2(ExtensionHostMsg_OpenMessagePort,
+ int /* frame_routing_id */,
+ int /* port_id */);
+
+// Sent in response to ExtensionMsg_DispatchOnConnect and whenever the port is
+// closed. The handle is the value returned by ExtensionHostMsg_OpenChannelTo*.
+IPC_MESSAGE_CONTROL3(ExtensionHostMsg_CloseMessagePort,
+ int /* frame_routing_id */,
+ int /* port_id */,
+ bool /* force_close */);
+
// Send a message to an extension process. The handle is the value returned
-// by ViewHostMsg_OpenChannelTo*.
+// by ExtensionHostMsg_OpenChannelTo*.
IPC_MESSAGE_ROUTED2(ExtensionHostMsg_PostMessage,
int /* port_id */,
extensions::Message)
-// Send a message to an extension process. The handle is the value returned
-// by ViewHostMsg_OpenChannelTo*.
-IPC_MESSAGE_CONTROL2(ExtensionHostMsg_CloseChannel,
- int /* port_id */,
- std::string /* error_message */)
-
// Used to get the extension message bundle.
IPC_SYNC_MESSAGE_CONTROL1_1(ExtensionHostMsg_GetMessageBundle,
std::string /* extension id */,

Powered by Google App Engine
This is Rietveld 408576698