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

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

Issue 921013002: Optionally have MessagePort pass data as base::Value, part 1. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@n-c-move-v8-value-converter
Patch Set: update to match changes in blink side patch Created 5 years, 9 months 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
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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 // port numbers. 75 // port numbers.
76 msp->UpdateMessagePort(*port1, delegate, *port1); 76 msp->UpdateMessagePort(*port1, delegate, *port1);
77 msp->UpdateMessagePort(*port2, delegate, *port2); 77 msp->UpdateMessagePort(*port2, delegate, *port2);
78 msp->Entangle(*port1, *port2); 78 msp->Entangle(*port1, *port2);
79 msp->Entangle(*port2, *port1); 79 msp->Entangle(*port2, *port1);
80 } 80 }
81 81
82 // static 82 // static
83 void MessagePortProvider::PostMessageToPort( 83 void MessagePortProvider::PostMessageToPort(
84 int sender_port_id, 84 int sender_port_id,
85 const base::string16& data, 85 const MessagePortMessage& message,
86 const std::vector<int>& sent_ports) { 86 const std::vector<int>& sent_ports) {
87 DCHECK_CURRENTLY_ON(BrowserThread::IO); 87 DCHECK_CURRENTLY_ON(BrowserThread::IO);
88 MessagePortService* msp = MessagePortService::GetInstance(); 88 MessagePortService* msp = MessagePortService::GetInstance();
89 msp->PostMessage(sender_port_id, data, sent_ports); 89 msp->PostMessage(sender_port_id, message, sent_ports);
90 } 90 }
91 91
92 // static 92 // static
93 void MessagePortProvider::OnMessagePortDelegateClosing( 93 void MessagePortProvider::OnMessagePortDelegateClosing(
94 MessagePortDelegate* delegate) { 94 MessagePortDelegate* delegate) {
95 MessagePortService::GetInstance()->OnMessagePortDelegateClosing(delegate); 95 MessagePortService::GetInstance()->OnMessagePortDelegateClosing(delegate);
96 } 96 }
97 97
98 } // namespace content 98 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698