| 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,
|
|
|