Chromium Code Reviews| 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..84cff10351684db5a2e3933799fa08636e8b5e58 100644 |
| --- a/content/browser/message_port_message_filter.cc |
| +++ b/content/browser/message_port_message_filter.cc |
| @@ -19,7 +19,7 @@ MessagePortMessageFilter::~MessagePortMessageFilter() { |
| } |
| void MessagePortMessageFilter::OnChannelClosing() { |
| - MessagePortService::GetInstance()->OnMessagePortMessageFilterClosing(this); |
| + MessagePortService::GetInstance()->OnMessagePortDelegateClosing(this); |
| } |
| bool MessagePortMessageFilter::OnMessageReceived(const IPC::Message& message) { |
| @@ -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 |
|
scheib
2014/12/18 00:24:10
This code block is more indirect now that a nestin
Marijn Kruisselbrink
2014/12/19 00:09:21
Okay, slightly rephrased the comment.
|
| + // 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::SendMessagesAreQueued(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) { |