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

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: Improve port lifetime management, add tests Created 5 years, 2 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 212cd7feb863c2cc9dc1ae38f49768d0315cc93e..b8b2c3d3b763aac46abf2af722e0723d44441680 100644
--- a/extensions/common/extension_messages.h
+++ b/extensions/common/extension_messages.h
@@ -180,14 +180,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)
@@ -654,24 +646,32 @@ IPC_SYNC_MESSAGE_CONTROL3_1(ExtensionHostMsg_OpenChannelToNativeApp,
// 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 /* 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 /* 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 /* 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