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

Unified Diff: chrome/browser/extensions/api/messaging/extension_message_port.cc

Issue 709933002: Add frameId to MessageSender (extension messaging API) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update test fix some more compiler errors 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
Index: chrome/browser/extensions/api/messaging/extension_message_port.cc
diff --git a/chrome/browser/extensions/api/messaging/extension_message_port.cc b/chrome/browser/extensions/api/messaging/extension_message_port.cc
index d5d0b1fd9a097b7955c1ee7bf71874f63ecb4dc5..0095614a81212eb9590043a3e69cceadef2e0055 100644
--- a/chrome/browser/extensions/api/messaging/extension_message_port.cc
+++ b/chrome/browser/extensions/api/messaging/extension_message_port.cc
@@ -26,17 +26,22 @@ void ExtensionMessagePort::DispatchOnConnect(
int dest_port_id,
const std::string& channel_name,
const base::DictionaryValue& source_tab,
+ int source_frame_id,
const std::string& source_extension_id,
const std::string& target_extension_id,
const GURL& source_url,
const std::string& tls_channel_id) {
+ ExtensionMsg_TabConnectionInfo source;
+ source.tab.Swap(&source_tab);
robwu 2014/11/11 21:32:47 This line gives a compiler error because source_ta
not at google - send to devlin 2014/11/11 22:01:58 Ideally you'd pass a scoped_ptr<DictionaryValue> i
robwu 2014/11/11 22:20:49 Done.
+ source.frame_id = source_frame_id;
+
ExtensionMsg_ExternalConnectionInfo info;
info.target_id = target_extension_id;
info.source_id = source_extension_id;
info.source_url = source_url;
+
process_->Send(new ExtensionMsg_DispatchOnConnect(
- routing_id_, dest_port_id, channel_name, source_tab, info,
- tls_channel_id));
+ routing_id_, dest_port_id, channel_name, source, info, tls_channel_id));
}
void ExtensionMessagePort::DispatchOnDisconnect(

Powered by Google App Engine
This is Rietveld 408576698