OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/browser/renderer_host/render_message_filter.h" | 5 #include "content/browser/renderer_host/render_message_filter.h" |
6 | 6 |
7 #include <errno.h> | 7 #include <errno.h> |
8 #include <string.h> | 8 #include <string.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 const std::vector<media::MediaLogEvent>& events) { | 385 const std::vector<media::MediaLogEvent>& events) { |
386 // OnMediaLogEvents() is always dispatched to the UI thread for handling. | 386 // OnMediaLogEvents() is always dispatched to the UI thread for handling. |
387 // See OverrideThreadForMessage(). | 387 // See OverrideThreadForMessage(). |
388 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 388 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
389 if (media_internals_) | 389 if (media_internals_) |
390 media_internals_->OnMediaEvents(render_process_id_, events); | 390 media_internals_->OnMediaEvents(render_process_id_, events); |
391 } | 391 } |
392 | 392 |
393 void RenderMessageFilter::OnHasGpuProcess(IPC::Message* reply_ptr) { | 393 void RenderMessageFilter::OnHasGpuProcess(IPC::Message* reply_ptr) { |
394 std::unique_ptr<IPC::Message> reply(reply_ptr); | 394 std::unique_ptr<IPC::Message> reply(reply_ptr); |
395 GpuProcessHost::GetProcessHandles( | 395 GpuProcessHost::GetHasGpuProcess( |
396 base::Bind(&RenderMessageFilter::GetGpuProcessHandlesCallback, | 396 base::Bind(&RenderMessageFilter::GetHasGpuProcessCallback, |
397 weak_ptr_factory_.GetWeakPtr(), base::Passed(&reply))); | 397 weak_ptr_factory_.GetWeakPtr(), base::Passed(&reply))); |
398 } | 398 } |
399 | 399 |
400 void RenderMessageFilter::GetGpuProcessHandlesCallback( | 400 void RenderMessageFilter::GetHasGpuProcessCallback( |
401 std::unique_ptr<IPC::Message> reply, | 401 std::unique_ptr<IPC::Message> reply, |
402 const std::list<base::ProcessHandle>& handles) { | 402 bool has_gpu) { |
403 bool has_gpu_process = handles.size() > 0; | 403 ChildProcessHostMsg_HasGpuProcess::WriteReplyParams(reply.get(), has_gpu); |
404 ChildProcessHostMsg_HasGpuProcess::WriteReplyParams(reply.get(), | |
405 has_gpu_process); | |
406 Send(reply.release()); | 404 Send(reply.release()); |
407 } | 405 } |
408 | 406 |
409 } // namespace content | 407 } // namespace content |
OLD | NEW |