| 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 870993b306b7bd7a4e4f9659383e78866a560f92..68ad9ebf55b41a2fe4cc87c9a957c4fc32461485 100644
|
| --- a/content/browser/gpu/gpu_process_host.cc
|
| +++ b/content/browser/gpu/gpu_process_host.cc
|
| @@ -196,6 +196,14 @@ void SendGpuProcessMessage(GpuProcessHost::GpuProcessKind kind,
|
| }
|
| }
|
|
|
| +void RunCallbackOnIO(GpuProcessHost::GpuProcessKind kind,
|
| + bool force_create,
|
| + const base::Callback<void(GpuProcessHost*)>& callback) {
|
| + GpuProcessHost* host = GpuProcessHost::Get(kind, force_create);
|
| + if (host)
|
| + callback.Run(host);
|
| +}
|
| +
|
| #if defined(USE_OZONE)
|
| void SendGpuProcessMessageByHostId(int host_id, IPC::Message* message) {
|
| GpuProcessHost* host = GpuProcessHost::FromID(host_id);
|
| @@ -427,6 +435,16 @@ void GpuProcessHost::SendOnIO(GpuProcessKind kind,
|
| }
|
| }
|
|
|
| +// static
|
| +void GpuProcessHost::CallOnIO(
|
| + GpuProcessKind kind,
|
| + bool force_create,
|
| + const base::Callback<void(GpuProcessHost*)>& callback) {
|
| + BrowserThread::PostTask(
|
| + BrowserThread::IO, FROM_HERE,
|
| + base::Bind(&RunCallbackOnIO, kind, force_create, callback));
|
| +}
|
| +
|
| service_manager::InterfaceProvider* GpuProcessHost::GetRemoteInterfaces() {
|
| return process_->child_connection()->GetRemoteInterfaces();
|
| }
|
|
|