Index: chrome/gpu/chrome_content_gpu_client.cc |
diff --git a/chrome/gpu/chrome_content_gpu_client.cc b/chrome/gpu/chrome_content_gpu_client.cc |
index 516080a7591ec4c5ac01b95c91a2b1a1ae1c0e8e..f847f7eba55cdb4c3826b18d9e62661d2594b354 100644 |
--- a/chrome/gpu/chrome_content_gpu_client.cc |
+++ b/chrome/gpu/chrome_content_gpu_client.cc |
@@ -13,6 +13,7 @@ |
#include "base/time/time.h" |
#include "chrome/common/stack_sampling_configuration.h" |
#include "components/metrics/child_call_stack_profile_collector.h" |
+#include "content/public/child/child_thread.h" |
#include "content/public/common/content_switches.h" |
#include "content/public/common/service_names.mojom.h" |
#include "mojo/public/cpp/bindings/strong_binding.h" |
@@ -20,7 +21,9 @@ |
#if defined(OS_CHROMEOS) |
#include "chrome/gpu/gpu_arc_video_service.h" |
-#include "services/service_manager/public/cpp/interface_registry.h" |
+#include "content/public/common/service_manager_connection.h" |
+#include "content/public/common/simple_connection_filter.h" |
+#include "services/service_manager/public/cpp/binder_registry.h" |
#endif |
namespace { |
@@ -70,20 +73,21 @@ void ChromeContentGpuClient::Initialize( |
} |
} |
-void ChromeContentGpuClient::ExposeInterfacesToBrowser( |
- service_manager::InterfaceRegistry* registry, |
+void ChromeContentGpuClient::GpuServiceInitialized( |
const gpu::GpuPreferences& gpu_preferences) { |
#if defined(OS_CHROMEOS) |
- registry->AddInterface( |
- base::Bind(&CreateGpuArcVideoService, gpu_preferences)); |
+ auto registry = base::MakeUnique<service_manager::BinderRegistry>(); |
+ registry->AddInterface(base::Bind(&CreateGpuArcVideoService, gpu_preferences), |
+ base::ThreadTaskRunnerHandle::Get()); |
+ content::ChildThread::Get() |
+ ->GetServiceManagerConnection() |
+ ->AddConnectionFilter(base::MakeUnique<content::SimpleConnectionFilter>( |
+ std::move(registry))); |
#endif |
-} |
-void ChromeContentGpuClient::ConsumeInterfacesFromBrowser( |
- service_manager::Connector* connector) { |
metrics::mojom::CallStackProfileCollectorPtr browser_interface; |
- connector->BindInterface(content::mojom::kBrowserServiceName, |
- &browser_interface); |
+ content::ChildThread::Get()->GetConnector()->BindInterface( |
+ content::mojom::kBrowserServiceName, &browser_interface); |
g_call_stack_profile_collector.Get().SetParentProfileCollector( |
std::move(browser_interface)); |
} |