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

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

Issue 2019973002: [mojo-edk] Bind a child token to child launches and port reservations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 6 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/mojo/mojo_application_host.h » ('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 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_) {
« no previous file with comments | « content/browser/gpu/gpu_process_host.h ('k') | content/browser/mojo/mojo_application_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698