Eliminate Content's use of ServiceFactory
Content sort of repurposed Service Manager's ServiceFactory interface to
push service launching requests into child processes. ServiceFactory is
going away to simplify Service Manager APIs, so this CL moves the child
process "run a service" request into a new message on the existing
content.mojom.ChildControl interface held by all ChildProcessHosts.
Most of the CL is plumbing calls from process hosts down to their child
threads.
This also finally eliminates content::ServiceFactory which has over time
diminished into a pretty useless base class for UtilityServiceFactory
and GpuServiceFactory.
Bug: 925860
Change-Id: I451de1f6e69f36a7fcacc4712aee67a8aca569d3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1512786
Reviewed-by: Tom Sepez <[email protected]>
Reviewed-by: Kenneth Russell <[email protected]>
Reviewed-by: Avi Drissman <[email protected]>
Reviewed-by: Sadrul Chowdhury <[email protected]>
Commit-Queue: Ken Rockot <[email protected]>
Cr-Commit-Position: refs/heads/master@{#639817}
diff --git a/components/viz/host/gpu_host_impl.h b/components/viz/host/gpu_host_impl.h
index b5067b1..a2a7da2 100644
--- a/components/viz/host/gpu_host_impl.h
+++ b/components/viz/host/gpu_host_impl.h
@@ -24,7 +24,9 @@
#include "gpu/command_buffer/common/activity_flags.h"
#include "gpu/config/gpu_domain_guilt.h"
#include "mojo/public/cpp/bindings/binding.h"
+#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/system/message_pipe.h"
+#include "services/service_manager/public/mojom/service.mojom.h"
#include "services/viz/privileged/interfaces/compositing/frame_sink_manager.mojom.h"
#include "services/viz/privileged/interfaces/gl/gpu_host.mojom.h"
#include "services/viz/privileged/interfaces/gl/gpu_service.mojom.h"
@@ -97,6 +99,9 @@
virtual void BindInterface(
const std::string& interface_name,
mojo::ScopedMessagePipeHandle interface_pipe) = 0;
+ virtual void RunService(
+ const std::string& service_name,
+ mojo::PendingReceiver<service_manager::mojom::Service> receiver) = 0;
#if defined(USE_OZONE)
virtual void TerminateGpuProcess(const std::string& message) = 0;
@@ -185,6 +190,9 @@
void BindInterface(const std::string& interface_name,
mojo::ScopedMessagePipeHandle interface_pipe);
+ void RunService(
+ const std::string& service_name,
+ mojo::PendingReceiver<service_manager::mojom::Service> receiver);
mojom::GpuService* gpu_service();