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

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

Issue 2741203002: memory-infra: Finish moving to Mojo (3nd attempt) (Closed)
Patch Set: rebase 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 ae0025ec0dd5268c35cc4033592bc6228cc65c5b..ea6bf08fe78baff0d0f09a27e328b83525405eb2 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"
@@ -339,6 +342,14 @@ class GpuProcessHost::ConnectionFilterImpl : public ConnectionFilter {
if (remote_identity.name() != mojom::kGpuServiceName)
return false;
+ registry->AddInterface(
+ base::Bind(
+ &memory_instrumentation::CoordinatorImpl::BindCoordinatorRequest,
+ base::Unretained(
+ memory_instrumentation::CoordinatorImpl::GetInstance())),
+ content::BrowserThread::GetTaskRunnerForThread(
+ content::BrowserThread::UI));
+
GetContentClient()->browser()->ExposeInterfacesToGpuProcess(registry,
host_);
return true;
« no previous file with comments | « content/browser/gpu/browser_gpu_channel_host_factory.cc ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698