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

Unified Diff: content/browser/gpu/gpu_process_host.cc

Issue 2741203002: memory-infra: Finish moving to Mojo (3nd attempt) (Closed)
Patch Set: nit Created 3 years, 9 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/gpu/gpu_process_host.cc
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
index 33dc88f7ca9cff248d0d8a66fa1fa49fb5db53f8..558980b570bcf58383e1226353626ac3ca9093e5 100644
--- a/content/browser/gpu/gpu_process_host.cc
+++ b/content/browser/gpu/gpu_process_host.cc
@@ -28,6 +28,7 @@
#include "build/build_config.h"
#include "components/tracing/common/tracing_switches.h"
#include "content/browser/browser_child_process_host_impl.h"
+#include "content/browser/browser_main_loop.h"
#include "content/browser/gpu/compositor_util.h"
#include "content/browser/gpu/gpu_data_manager_impl.h"
#include "content/browser/gpu/gpu_main_thread_factory.h"
@@ -66,8 +67,10 @@
#include "media/base/media_switches.h"
#include "media/media_features.h"
#include "mojo/edk/embedder/embedder.h"
+#include "services/resource_coordinator/memory/coordinator/coordinator_impl.h"
#include "services/service_manager/public/cpp/connection.h"
#include "services/service_manager/public/cpp/interface_provider.h"
+#include "services/service_manager/public/cpp/interface_registry.h"
#include "services/service_manager/runner/common/client_util.h"
#include "ui/base/ui_base_switches.h"
#include "ui/events/latency_info.h"
@@ -340,6 +343,14 @@ class GpuProcessHost::ConnectionFilterImpl : public ConnectionFilter {
if (remote_identity.name() != mojom::kGpuServiceName)
return false;
+ registry->AddInterface(
+ base::Bind(
+ &memory_instrumentation::CoordinatorImpl::BindCoordinatorRequest,
+ base::Unretained(
+ BrowserMainLoop::GetMemoryInstrumentationCoordinator())),
+ content::BrowserThread::GetTaskRunnerForThread(
+ content::BrowserThread::UI));
+
GetContentClient()->browser()->ExposeInterfacesToGpuProcess(registry,
host_);
return true;

Powered by Google App Engine
This is Rietveld 408576698