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

Side by Side Diff: content/browser/message_port_provider.cc

Issue 766623002: Verify that Message Channel Message Ports can be transferred correctly (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix order 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 unified diff | Download patch
« no previous file with comments | « android_webview/javatests/src/org/chromium/android_webview/test/PostMessageTest.java ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « android_webview/javatests/src/org/chromium/android_webview/test/PostMessageTest.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698