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 8727e61632ee8cffd2e5c80ec803cc53dd3f61e2..af70856cc2bc503bd7e44fdd614b40b554c9baa4 100644 |
--- a/content/browser/gpu/gpu_process_host.cc |
+++ b/content/browser/gpu/gpu_process_host.cc |
@@ -52,6 +52,7 @@ |
#include "ipc/ipc_switches.h" |
#include "ipc/message_filter.h" |
#include "media/base/media_switches.h" |
+#include "mojo/edk/embedder/embedder.h" |
#include "ui/base/ui_base_switches.h" |
#include "ui/events/latency_info.h" |
#include "ui/gl/gl_switches.h" |
@@ -407,7 +408,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), |
+ child_token_(mojo::edk::GenerateRandomToken()) { |
if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
switches::kSingleProcess) || |
base::CommandLine::ForCurrentProcess()->HasSwitch( |
@@ -431,7 +433,8 @@ GpuProcessHost::GpuProcessHost(int host_id, GpuProcessKind kind) |
FROM_HERE, |
base::Bind(base::IgnoreResult(&GpuProcessHostUIShim::Create), host_id)); |
- process_.reset(new BrowserChildProcessHostImpl(PROCESS_TYPE_GPU, this)); |
+ process_.reset(new BrowserChildProcessHostImpl(PROCESS_TYPE_GPU, this, |
+ child_token_)); |
} |
GpuProcessHost::~GpuProcessHost() { |
@@ -544,7 +547,7 @@ bool GpuProcessHost::Init() { |
return false; |
DCHECK(!mojo_application_host_); |
- mojo_application_host_.reset(new MojoApplicationHost); |
+ mojo_application_host_.reset(new MojoApplicationHost(child_token_)); |
gpu::GpuPreferences gpu_preferences = GetGpuPreferencesFromCommandLine(); |
if (in_process_) { |