OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/gpu_process_host_ui_shim.h" | 5 #include "chrome/browser/gpu_process_host_ui_shim.h" |
6 | 6 |
7 #include "chrome/browser/browser_thread.h" | 7 #include "chrome/browser/browser_thread.h" |
8 #include "chrome/browser/gpu_process_host.h" | 8 #include "chrome/browser/gpu_process_host.h" |
9 #include "chrome/browser/renderer_host/render_view_host.h" | 9 #include "chrome/browser/renderer_host/render_view_host.h" |
10 #include "chrome/browser/renderer_host/render_widget_host_view.h" | 10 #include "chrome/browser/renderer_host/render_widget_host_view.h" |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 | 75 |
76 bool GpuProcessHostUIShim::OnMessageReceived(const IPC::Message& message) { | 76 bool GpuProcessHostUIShim::OnMessageReceived(const IPC::Message& message) { |
77 DCHECK(CalledOnValidThread()); | 77 DCHECK(CalledOnValidThread()); |
78 | 78 |
79 if (message.routing_id() == MSG_ROUTING_CONTROL) | 79 if (message.routing_id() == MSG_ROUTING_CONTROL) |
80 return OnControlMessageReceived(message); | 80 return OnControlMessageReceived(message); |
81 | 81 |
82 return router_.RouteMessage(message); | 82 return router_.RouteMessage(message); |
83 } | 83 } |
84 | 84 |
85 void GpuProcessHostUIShim::CollectGraphicsInfoAsynchronously() { | 85 void GpuProcessHostUIShim::CollectGraphicsInfoAsynchronously( |
| 86 GPUInfo::Level level) { |
86 DCHECK(CalledOnValidThread()); | 87 DCHECK(CalledOnValidThread()); |
87 BrowserThread::PostTask( | 88 BrowserThread::PostTask( |
88 BrowserThread::IO, | 89 BrowserThread::IO, |
89 FROM_HERE, | 90 FROM_HERE, |
90 new SendOnIOThreadTask(new GpuMsg_CollectGraphicsInfo())); | 91 new SendOnIOThreadTask(new GpuMsg_CollectGraphicsInfo(level))); |
91 } | 92 } |
92 | 93 |
93 void GpuProcessHostUIShim::SendAboutGpuCrash() { | 94 void GpuProcessHostUIShim::SendAboutGpuCrash() { |
94 DCHECK(CalledOnValidThread()); | 95 DCHECK(CalledOnValidThread()); |
95 BrowserThread::PostTask( | 96 BrowserThread::PostTask( |
96 BrowserThread::IO, | 97 BrowserThread::IO, |
97 FROM_HERE, | 98 FROM_HERE, |
98 new SendOnIOThreadTask(new GpuMsg_Crash())); | 99 new SendOnIOThreadTask(new GpuMsg_Crash())); |
99 } | 100 } |
100 | 101 |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 #elif defined(OS_WIN) | 254 #elif defined(OS_WIN) |
254 IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuHostMsg_GetCompositorHostWindow, | 255 IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuHostMsg_GetCompositorHostWindow, |
255 OnGetCompositorHostWindow) | 256 OnGetCompositorHostWindow) |
256 IPC_MESSAGE_HANDLER(GpuHostMsg_ScheduleComposite, OnScheduleComposite); | 257 IPC_MESSAGE_HANDLER(GpuHostMsg_ScheduleComposite, OnScheduleComposite); |
257 #endif | 258 #endif |
258 IPC_MESSAGE_UNHANDLED_ERROR() | 259 IPC_MESSAGE_UNHANDLED_ERROR() |
259 IPC_END_MESSAGE_MAP() | 260 IPC_END_MESSAGE_MAP() |
260 | 261 |
261 return true; | 262 return true; |
262 } | 263 } |
OLD | NEW |