| 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 3376cb5993dfe4c514f469856d3569c60cb631ff..9692e1d2d83e00396336934be257741f1e82ac00 100644
|
| --- a/content/browser/gpu/gpu_process_host.cc
|
| +++ b/content/browser/gpu/gpu_process_host.cc
|
| @@ -82,6 +82,8 @@
|
| #endif
|
|
|
| #if defined(USE_OZONE)
|
| +#include "ui/ozone/public/gpu_platform_support_host.h"
|
| +#include "ui/ozone/public/ozone_platform.h"
|
| #include "ui/ozone/public/ozone_switches.h"
|
| #endif
|
|
|
| @@ -184,6 +186,15 @@ void SendGpuProcessMessage(GpuProcessHost::GpuProcessKind kind,
|
| }
|
| }
|
|
|
| +void SendGpuProcessMessageByHostId(int host_id, IPC::Message* message) {
|
| + GpuProcessHost* host = GpuProcessHost::FromID(host_id);
|
| + if (host) {
|
| + host->Send(message);
|
| + } else {
|
| + delete message;
|
| + }
|
| +}
|
| +
|
| // NOTE: changes to this class need to be reviewed by the security team.
|
| class GpuSandboxedProcessLauncherDelegate
|
| : public SandboxedProcessLauncherDelegate {
|
| @@ -454,6 +465,14 @@ GpuProcessHost::GpuProcessHost(int host_id, GpuProcessKind kind)
|
|
|
| g_gpu_process_hosts[kind] = this;
|
|
|
| +#if defined(USE_OZONE)
|
| + ui::OzonePlatform::GetInstance()
|
| + ->GetGpuPlatformSupportHost()
|
| + ->OnGpuProcessLaunched(
|
| + host_id, BrowserThread::GetTaskRunnerForThread(BrowserThread::IO),
|
| + base::Bind(&SendGpuProcessMessageByHostId, host_id));
|
| +#endif
|
| +
|
| // Post a task to create the corresponding GpuProcessHostUIShim. The
|
| // GpuProcessHostUIShim will be destroyed if either the browser exits,
|
| // in which case it calls GpuProcessHostUIShim::DestroyAll, or the
|
|
|