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

Unified Diff: ipc/ipc_channel_proxy.cc

Issue 2668153003: Mojo C++ Bindings: Eliminate unbound ThreadSafeInterfacePtr (Closed)
Patch Set: format and rebase... Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ipc/ipc_channel_proxy.h ('k') | ipc/ipc_message_pipe_reader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_channel_proxy.cc
diff --git a/ipc/ipc_channel_proxy.cc b/ipc/ipc_channel_proxy.cc
index 91e8236e8cda10d252846175a6a99ca12c129f67..6759c49f81af1283e073c604c167c1a6c76142bf 100644
--- a/ipc/ipc_channel_proxy.cc
+++ b/ipc/ipc_channel_proxy.cc
@@ -68,6 +68,7 @@ void ChannelProxy::Context::CreateChannel(
channel_->GetAssociatedInterfaceSupport();
if (support) {
associated_group_ = *support->GetAssociatedGroup();
+ thread_safe_channel_ = support->CreateThreadSafeChannel();
base::AutoLock l(pending_filters_lock_);
for (auto& entry : pending_io_thread_interfaces_)
@@ -398,19 +399,6 @@ void ChannelProxy::Context::Send(Message* message) {
base::Passed(base::WrapUnique(message))));
}
-// Called on the IPC::Channel thread
-void ChannelProxy::Context::GetRemoteAssociatedInterface(
- const std::string& name,
- mojo::ScopedInterfaceEndpointHandle handle) {
- if (!channel_)
- return;
- Channel::AssociatedInterfaceSupport* associated_interface_support =
- channel_->GetAssociatedInterfaceSupport();
- DCHECK(associated_interface_support);
- associated_interface_support->GetGenericRemoteAssociatedInterface(
- name, std::move(handle));
-}
-
//-----------------------------------------------------------------------------
// static
@@ -580,14 +568,14 @@ void ChannelProxy::GetGenericRemoteAssociatedInterface(
const std::string& name,
mojo::ScopedInterfaceEndpointHandle handle) {
DCHECK(did_init_);
- context_->ipc_task_runner()->PostTask(
- FROM_HERE, base::Bind(&Context::GetRemoteAssociatedInterface,
- context_, name, base::Passed(&handle)));
+ mojom::GenericInterfaceAssociatedRequest request;
+ request.Bind(std::move(handle));
+ context()->thread_safe_channel().GetAssociatedInterface(name,
+ std::move(request));
}
void ChannelProxy::ClearIPCTaskRunner() {
DCHECK(CalledOnValidThread());
-
context()->ClearIPCTaskRunner();
}
« no previous file with comments | « ipc/ipc_channel_proxy.h ('k') | ipc/ipc_message_pipe_reader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698