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

Unified Diff: content/browser/mojo/mojo_child_connection.cc

Issue 2201183003: Remove outgoing interface registry on RPH (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 side-by-side diff with in-line comments
Download patch
Index: content/browser/mojo/mojo_child_connection.cc
diff --git a/content/browser/mojo/mojo_child_connection.cc b/content/browser/mojo/mojo_child_connection.cc
index e5a1172a380f3b419c968bccb5992515566ede14..7ea34cf6e6cb40ead65695cc6394a9fcc79f7260 100644
--- a/content/browser/mojo/mojo_child_connection.cc
+++ b/content/browser/mojo/mojo_child_connection.cc
@@ -39,8 +39,7 @@ class MojoChildConnection::IOThreadContext
void Initialize(const shell::Identity& child_identity,
shell::Connector* connector,
mojo::ScopedMessagePipeHandle service_pipe,
- scoped_refptr<base::SequencedTaskRunner> io_task_runner,
- const shell::InterfaceRegistry::Binder& default_binder) {
+ scoped_refptr<base::SequencedTaskRunner> io_task_runner) {
DCHECK(!io_task_runner_);
io_task_runner_ = io_task_runner;
std::unique_ptr<shell::Connector> io_thread_connector;
@@ -51,9 +50,7 @@ class MojoChildConnection::IOThreadContext
base::Bind(&IOThreadContext::InitializeOnIOThread, this,
child_identity,
base::Passed(&io_thread_connector),
- base::Passed(&service_pipe),
- base::Bind(&CallBinderOnTaskRunner, default_binder,
- base::ThreadTaskRunnerHandle::Get())));
+ base::Passed(&service_pipe)));
}
void ShutDown() {
@@ -89,8 +86,7 @@ class MojoChildConnection::IOThreadContext
void InitializeOnIOThread(
const shell::Identity& child_identity,
std::unique_ptr<shell::Connector> connector,
- mojo::ScopedMessagePipeHandle service_pipe,
- const shell::InterfaceRegistry::Binder& default_binder) {
+ mojo::ScopedMessagePipeHandle service_pipe) {
shell::mojom::ServicePtr service;
service.Bind(mojo::InterfacePtrInfo<shell::mojom::Service>(
std::move(service_pipe), 0u));
@@ -102,11 +98,8 @@ class MojoChildConnection::IOThreadContext
std::move(pid_receiver_request));
// In some unit testing scenarios a null connector is passed.
- if (!connector)
- return;
-
- connection_ = connector->Connect(&params);
- connection_->GetInterfaceRegistry()->set_default_binder(default_binder);
+ if (connector)
+ connection_ = connector->Connect(&params);
}
void ShutDownOnIOThread() {
@@ -136,17 +129,13 @@ MojoChildConnection::MojoChildConnection(
: context_(new IOThreadContext),
child_identity_(service_name, shell::mojom::kInheritUserID, instance_id),
service_token_(mojo::edk::GenerateRandomToken()),
- interface_registry_(nullptr),
weak_factory_(this) {
mojo::ScopedMessagePipeHandle service_pipe =
mojo::edk::CreateParentMessagePipe(service_token_, child_token);
context_ = new IOThreadContext;
- context_->Initialize(
- child_identity_, connector, std::move(service_pipe),
- io_task_runner,
- base::Bind(&MojoChildConnection::GetInterface,
- weak_factory_.GetWeakPtr()));
+ context_->Initialize(child_identity_, connector, std::move(service_pipe),
+ io_task_runner);
remote_interfaces_.Forward(
base::Bind(&CallBinderOnTaskRunner,
base::Bind(&IOThreadContext::GetRemoteInterfaceOnIOThread,
@@ -161,11 +150,4 @@ void MojoChildConnection::SetProcessHandle(base::ProcessHandle handle) {
context_->SetProcessHandle(handle);
}
-void MojoChildConnection::GetInterface(
- const mojo::String& interface_name,
- mojo::ScopedMessagePipeHandle request_handle) {
- static_cast<shell::mojom::InterfaceProvider*>(&interface_registry_)
- ->GetInterface(interface_name, std::move(request_handle));
-}
-
} // namespace content
« no previous file with comments | « content/browser/mojo/mojo_child_connection.h ('k') | content/browser/renderer_host/render_process_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698