| 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 a5997db7c807f1b24ebee9176dec07d6af2a7ec9..bf1fa07948461ea02e5be36bc04d80fe0e2d82cb 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 has_gpu_process = handles.size() > 0;
|
| + GpuHostMsg_HasGpuProcess::WriteReplyParams(reply.get(), has_gpu_process);
|
| + Send(reply.release());
|
| +}
|
| +
|
| } // namespace content
|
|
|