| Index: content/browser/renderer_host/gpu_message_filter.cc
|
| diff --git a/content/browser/renderer_host/gpu_message_filter.cc b/content/browser/renderer_host/gpu_message_filter.cc
|
| index 71b03b0a81966fee9bddec3430e601a5a95376c2..459ba22e18cbf5cd4b01bd72c9d49f01398112ed 100644
|
| --- a/content/browser/renderer_host/gpu_message_filter.cc
|
| +++ b/content/browser/renderer_host/gpu_message_filter.cc
|
| @@ -34,6 +34,7 @@ bool GpuMessageFilter::OnMessageReceived(const IPC::Message& message) {
|
| IPC_BEGIN_MESSAGE_MAP(GpuMessageFilter, message)
|
| IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuHostMsg_EstablishGpuChannel,
|
| OnEstablishGpuChannel)
|
| + IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuHostMsg_HasGpuProcess, OnHasGpuProcess)
|
| IPC_MESSAGE_UNHANDLED(handled = false)
|
| IPC_END_MESSAGE_MAP()
|
| return handled;
|
| @@ -80,6 +81,13 @@ void GpuMessageFilter::OnEstablishGpuChannel(
|
| weak_ptr_factory_.GetWeakPtr(), base::Passed(&reply)));
|
| }
|
|
|
| +void GpuMessageFilter::OnHasGpuProcess(IPC::Message* reply_ptr) {
|
| + scoped_ptr<IPC::Message> reply(reply_ptr);
|
| + GpuProcessHost::GetProcessHandles(
|
| + base::Bind(&GpuMessageFilter::GetGpuProcessHandlesCallback,
|
| + weak_ptr_factory_.GetWeakPtr(), base::Passed(&reply)));
|
| +}
|
| +
|
| void GpuMessageFilter::EstablishChannelCallback(
|
| scoped_ptr<IPC::Message> reply,
|
| const IPC::ChannelHandle& channel,
|
| @@ -91,4 +99,12 @@ void GpuMessageFilter::EstablishChannelCallback(
|
| Send(reply.release());
|
| }
|
|
|
| +void GpuMessageFilter::GetGpuProcessHandlesCallback(
|
| + scoped_ptr<IPC::Message> reply,
|
| + const std::list<base::ProcessHandle>& handles) {
|
| + bool hasGpuProcess = handles.size() > 0;
|
| + GpuHostMsg_HasGpuProcess::WriteReplyParams(reply.get(), hasGpuProcess);
|
| + Send(reply.release());
|
| +}
|
| +
|
| } // namespace content
|
|
|