OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/public/browser/message_port_provider.h" | 5 #include "content/public/browser/message_port_provider.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "content/browser/browser_thread_impl.h" | 8 #include "content/browser/browser_thread_impl.h" |
9 #include "content/browser/message_port_message_filter.h" | 9 #include "content/browser/message_port_message_filter.h" |
10 #include "content/browser/message_port_service.h" | 10 #include "content/browser/message_port_service.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 *port1 = 0; | 56 *port1 = 0; |
57 *port2 = 0; | 57 *port2 = 0; |
58 | 58 |
59 RenderProcessHostImpl* rph = | 59 RenderProcessHostImpl* rph = |
60 static_cast<RenderProcessHostImpl*>( | 60 static_cast<RenderProcessHostImpl*>( |
61 web_contents->GetRenderProcessHost()); | 61 web_contents->GetRenderProcessHost()); |
62 MessagePortMessageFilter* mf = rph->message_port_message_filter(); | 62 MessagePortMessageFilter* mf = rph->message_port_message_filter(); |
63 MessagePortService* msp = MessagePortService::GetInstance(); | 63 MessagePortService* msp = MessagePortService::GetInstance(); |
64 msp->Create(mf->GetNextRoutingID(), mf, port1); | 64 msp->Create(mf->GetNextRoutingID(), mf, port1); |
65 msp->Create(mf->GetNextRoutingID(), mf, port2); | 65 msp->Create(mf->GetNextRoutingID(), mf, port2); |
| 66 msp->Entangle(*port1, *port2); |
| 67 msp->Entangle(*port2, *port1); |
66 } | 68 } |
67 | 69 |
68 } // namespace content | 70 } // namespace content |
OLD | NEW |