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

Side by Side Diff: content/browser/mojo/mojo_child_connection.cc

Issue 2191033002: Split ServiceRegistryAndroid into InterfaceRegistryAndroid and InterfaceProviderAndroid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 4 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/browser/mojo/mojo_child_connection.h" 5 #include "content/browser/mojo/mojo_child_connection.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 application_name, instance_id, connector, std::move(service_pipe), 149 application_name, instance_id, connector, std::move(service_pipe),
150 io_task_runner, 150 io_task_runner,
151 base::Bind(&MojoChildConnection::GetInterface, 151 base::Bind(&MojoChildConnection::GetInterface,
152 weak_factory_.GetWeakPtr())); 152 weak_factory_.GetWeakPtr()));
153 remote_interfaces_.Forward( 153 remote_interfaces_.Forward(
154 base::Bind(&CallBinderOnTaskRunner, 154 base::Bind(&CallBinderOnTaskRunner,
155 base::Bind(&IOThreadContext::GetRemoteInterfaceOnIOThread, 155 base::Bind(&IOThreadContext::GetRemoteInterfaceOnIOThread,
156 context_), io_task_runner)); 156 context_), io_task_runner));
157 157
158 #if defined(OS_ANDROID) 158 #if defined(OS_ANDROID)
159 service_registry_android_ = 159 interface_registry_android_ =
160 ServiceRegistryAndroid::Create(&interface_registry_, &remote_interfaces_); 160 InterfaceRegistryAndroid::Create(&interface_registry_);
161 #endif 161 #endif
162 } 162 }
163 163
164 MojoChildConnection::~MojoChildConnection() { 164 MojoChildConnection::~MojoChildConnection() {
165 context_->ShutDown(); 165 context_->ShutDown();
166 } 166 }
167 167
168 void MojoChildConnection::SetProcessHandle(base::ProcessHandle handle) { 168 void MojoChildConnection::SetProcessHandle(base::ProcessHandle handle) {
169 context_->SetProcessHandle(handle); 169 context_->SetProcessHandle(handle);
170 } 170 }
171 171
172 void MojoChildConnection::GetInterface( 172 void MojoChildConnection::GetInterface(
173 const mojo::String& interface_name, 173 const mojo::String& interface_name,
174 mojo::ScopedMessagePipeHandle request_handle) { 174 mojo::ScopedMessagePipeHandle request_handle) {
175 static_cast<shell::mojom::InterfaceProvider*>(&interface_registry_) 175 static_cast<shell::mojom::InterfaceProvider*>(&interface_registry_)
176 ->GetInterface(interface_name, std::move(request_handle)); 176 ->GetInterface(interface_name, std::move(request_handle));
177 } 177 }
178 178
179 } // namespace content 179 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/mojo/mojo_child_connection.h ('k') | content/browser/mojo/service_registrar_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698