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

Unified Diff: content/common/child_process_host_impl.cc

Issue 2766263009: Convert content ConnectionFilter to OnBindInterface (Closed)
Patch Set: . Created 3 years, 8 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 | « content/common/child_process_host_impl.h ('k') | content/common/service_manager/child_connection.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/child_process_host_impl.cc
diff --git a/content/common/child_process_host_impl.cc b/content/common/child_process_host_impl.cc
index 7e8e4203ad32da4ae8803f5547de588aba6da242..9689c72d6fb5cc4f98c91389e5c8e26d232f4431 100644
--- a/content/common/child_process_host_impl.cc
+++ b/content/common/child_process_host_impl.cc
@@ -109,9 +109,10 @@ void ChildProcessHostImpl::AddFilter(IPC::MessageFilter* filter) {
filter->OnFilterAdded(channel_.get());
}
-service_manager::InterfaceProvider*
-ChildProcessHostImpl::GetRemoteInterfaces() {
- return delegate_->GetRemoteInterfaces();
+void ChildProcessHostImpl::BindInterface(
+ const std::string& interface_name,
+ mojo::ScopedMessagePipeHandle interface_pipe) {
+ return delegate_->BindInterface(interface_name, std::move(interface_pipe));
}
void ChildProcessHostImpl::ForceShutdown() {
@@ -136,12 +137,9 @@ void ChildProcessHostImpl::CreateChannelMojo() {
DCHECK(channel_id_.empty());
channel_id_ = "ChannelMojo";
- service_manager::InterfaceProvider* remote_interfaces = GetRemoteInterfaces();
- DCHECK(remote_interfaces);
-
- IPC::mojom::ChannelBootstrapPtr bootstrap;
- remote_interfaces->GetInterface(&bootstrap);
- channel_ = IPC::ChannelMojo::Create(bootstrap.PassInterface().PassHandle(),
+ mojo::MessagePipe pipe;
+ BindInterface(IPC::mojom::ChannelBootstrap::Name_, std::move(pipe.handle1));
+ channel_ = IPC::ChannelMojo::Create(std::move(pipe.handle0),
IPC::Channel::MODE_SERVER, this);
DCHECK(channel_);
« no previous file with comments | « content/common/child_process_host_impl.h ('k') | content/common/service_manager/child_connection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698