Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(302)

Unified Diff: content/browser/renderer_host/gpu_message_filter.cc

Issue 1547793004: Make gpu black list work again on Linux (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Execute todo, send IPC directly from gpu_benchmarking_extension.cc and fixes variable names. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/renderer_host/gpu_message_filter.h ('k') | content/common/gpu/gpu_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « content/browser/renderer_host/gpu_message_filter.h ('k') | content/common/gpu/gpu_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698