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

Unified Diff: content/browser/message_port_message_filter.cc

Issue 668303004: WIP DO NOT COMMIT chromium side of navigator.connect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years 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 | « content/browser/message_port_message_filter.h ('k') | content/browser/message_port_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/message_port_message_filter.cc
diff --git a/content/browser/message_port_message_filter.cc b/content/browser/message_port_message_filter.cc
index c6e979e879aa6803ceb9071eff7c605e78985f78..a0e99dd62a38ca87204a7756417a7a45d54bfebf 100644
--- a/content/browser/message_port_message_filter.cc
+++ b/content/browser/message_port_message_filter.cc
@@ -59,6 +59,23 @@ int MessagePortMessageFilter::GetNextRoutingID() {
return next_routing_id_.Run();
}
+void MessagePortMessageFilter::SendMessage(
+ int route_id,
+ const base::string16& message,
+ const std::vector<int>& sent_message_port_ids) {
+ // If a message port was sent around, the new location will need a routing
+ // id. Instead of having the created port send us a sync message to get it,
+ // send along with the message.
+ std::vector<int> new_routing_ids;
+ UpdateMessagePortsWithNewRoutes(sent_message_port_ids, &new_routing_ids);
+ Send(new MessagePortMsg_Message(route_id, message, sent_message_port_ids,
+ new_routing_ids));
+}
+
+void MessagePortMessageFilter::SendMessagesQueued(int route_id) {
+ Send(new MessagePortMsg_MessagesQueued(route_id));
+}
+
void MessagePortMessageFilter::UpdateMessagePortsWithNewRoutes(
const std::vector<int>& message_port_ids,
std::vector<int>* new_routing_ids) {
« no previous file with comments | « content/browser/message_port_message_filter.h ('k') | content/browser/message_port_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698