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

Unified Diff: extensions/common/extension_messages.h

Issue 709933002: Add frameId to MessageSender (extension messaging API) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: test: sender.tab.status = 'complete' Created 6 years, 1 month 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 | « extensions/common/api/runtime.json ('k') | extensions/renderer/dispatcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/common/extension_messages.h
diff --git a/extensions/common/extension_messages.h b/extensions/common/extension_messages.h
index 45160b61360beffa7d41e0315bfac127f1e3e771..ee23e7ae8eea88e7e1217308d302c7f38e980c03 100644
--- a/extensions/common/extension_messages.h
+++ b/extensions/common/extension_messages.h
@@ -147,6 +147,17 @@ IPC_STRUCT_BEGIN(ExtensionMsg_ExecuteCode_Params)
IPC_STRUCT_MEMBER(bool, user_gesture)
IPC_STRUCT_END()
+// Struct containing information about the sender of connect() calls that
+// originate from a tab.
+IPC_STRUCT_BEGIN(ExtensionMsg_TabConnectionInfo)
+ // The tab from where the connection was created.
+ IPC_STRUCT_MEMBER(base::DictionaryValue, tab)
+
+ // The ID of the frame that initiated the connection.
+ // 0 if main frame, positive otherwise. -1 if not initiated from a frame.
+ IPC_STRUCT_MEMBER(int, frame_id)
+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)
@@ -487,7 +498,7 @@ IPC_MESSAGE_ROUTED2(ExtensionMsg_GetAppInstallStateResponse,
IPC_MESSAGE_ROUTED5(ExtensionMsg_DispatchOnConnect,
int /* target_port_id */,
std::string /* channel_name */,
- base::DictionaryValue /* source_tab */,
+ ExtensionMsg_TabConnectionInfo /* source */,
ExtensionMsg_ExternalConnectionInfo,
std::string /* tls_channel_id */)
« no previous file with comments | « extensions/common/api/runtime.json ('k') | extensions/renderer/dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698