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

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

Issue 1837143002: media: Pass MediaPermission to MediaDrmBridge Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More plumbing Created 4 years, 8 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
« no previous file with comments | « content/browser/gpu/gpu_process_host.h ('k') | content/browser/media/cdm/browser_cdm_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 f72aaefbade7055e1b0d53aaabb9c08d1a660122..34523b9cd3bd12a824ce5dce060e0506389e3417 100644
--- a/content/browser/gpu/gpu_process_host.cc
+++ b/content/browser/gpu/gpu_process_host.cc
@@ -404,7 +404,8 @@ GpuProcessHost::GpuProcessHost(int host_id, GpuProcessKind kind)
kind_(kind),
process_launched_(false),
initialized_(false),
- uma_memory_stats_received_(false) {
+ uma_memory_stats_received_(false),
+ permission_service_context_(new PermissionServiceContext(this)) {
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kSingleProcess) ||
base::CommandLine::ForCurrentProcess()->HasSwitch(
@@ -540,6 +541,7 @@ bool GpuProcessHost::Init() {
DCHECK(!mojo_application_host_);
mojo_application_host_.reset(new MojoApplicationHost);
+ RegisterMojoServices();
gpu::GpuPreferences gpu_preferences = GetGpuPreferencesFromCommandLine();
if (in_process_) {
@@ -571,6 +573,12 @@ bool GpuProcessHost::Init() {
return true;
}
+void GpuProcessHost::RegisterMojoServices() {
+ mojo_application_host_->service_registry()->AddService(
+ base::Bind(&PermissionServiceContext::CreateService,
+ base::Unretained(permission_service_context_.get())));
+}
+
void GpuProcessHost::RouteOnUIThread(const IPC::Message& message) {
BrowserThread::PostTask(
BrowserThread::UI,
« no previous file with comments | « content/browser/gpu/gpu_process_host.h ('k') | content/browser/media/cdm/browser_cdm_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698