| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/browser/message_port_service.h" | 5 #include "content/browser/message_port_service.h" |
| 6 | 6 |
| 7 #include <stddef.h> |
| 8 |
| 7 #include "content/common/message_port_messages.h" | 9 #include "content/common/message_port_messages.h" |
| 8 #include "content/public/browser/browser_thread.h" | 10 #include "content/public/browser/browser_thread.h" |
| 9 #include "content/public/browser/message_port_delegate.h" | 11 #include "content/public/browser/message_port_delegate.h" |
| 10 | 12 |
| 11 namespace content { | 13 namespace content { |
| 12 | 14 |
| 13 struct MessagePortService::MessagePort { | 15 struct MessagePortService::MessagePort { |
| 14 // |delegate| and |route_id| are what we need to send messages to the port. | 16 // |delegate| and |route_id| are what we need to send messages to the port. |
| 15 // |delegate| is just a raw pointer since it notifies us by calling | 17 // |delegate| is just a raw pointer since it notifies us by calling |
| 16 // OnMessagePortDelegateClosing before it gets destroyed. | 18 // OnMessagePortDelegateClosing before it gets destroyed. |
| (...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 // Do the disentanglement (and be paranoid about the other side existing | 335 // Do the disentanglement (and be paranoid about the other side existing |
| 334 // just in case something unusual happened during entanglement). | 336 // just in case something unusual happened during entanglement). |
| 335 if (message_ports_.count(entangled_id)) { | 337 if (message_ports_.count(entangled_id)) { |
| 336 message_ports_[entangled_id].entangled_message_port_id = MSG_ROUTING_NONE; | 338 message_ports_[entangled_id].entangled_message_port_id = MSG_ROUTING_NONE; |
| 337 } | 339 } |
| 338 } | 340 } |
| 339 message_ports_.erase(erase_item); | 341 message_ports_.erase(erase_item); |
| 340 } | 342 } |
| 341 | 343 |
| 342 } // namespace content | 344 } // namespace content |
| OLD | NEW |