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) { | |
87 DCHECK(CalledOnValidThread()); | 86 DCHECK(CalledOnValidThread()); |
88 BrowserThread::PostTask( | 87 BrowserThread::PostTask( |
89 BrowserThread::IO, | 88 BrowserThread::IO, |
90 FROM_HERE, | 89 FROM_HERE, |
91 new SendOnIOThreadTask(new GpuMsg_CollectGraphicsInfo(level))); | 90 new SendOnIOThreadTask(new GpuMsg_CollectGraphicsInfo())); |
92 } | 91 } |
93 | 92 |
94 void GpuProcessHostUIShim::SendAboutGpuCrash() { | 93 void GpuProcessHostUIShim::SendAboutGpuCrash() { |
95 DCHECK(CalledOnValidThread()); | 94 DCHECK(CalledOnValidThread()); |
96 BrowserThread::PostTask( | 95 BrowserThread::PostTask( |
97 BrowserThread::IO, | 96 BrowserThread::IO, |
98 FROM_HERE, | 97 FROM_HERE, |
99 new SendOnIOThreadTask(new GpuMsg_Crash())); | 98 new SendOnIOThreadTask(new GpuMsg_Crash())); |
100 } | 99 } |
101 | 100 |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 #elif defined(OS_WIN) | 253 #elif defined(OS_WIN) |
255 IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuHostMsg_GetCompositorHostWindow, | 254 IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuHostMsg_GetCompositorHostWindow, |
256 OnGetCompositorHostWindow) | 255 OnGetCompositorHostWindow) |
257 IPC_MESSAGE_HANDLER(GpuHostMsg_ScheduleComposite, OnScheduleComposite); | 256 IPC_MESSAGE_HANDLER(GpuHostMsg_ScheduleComposite, OnScheduleComposite); |
258 #endif | 257 #endif |
259 IPC_MESSAGE_UNHANDLED_ERROR() | 258 IPC_MESSAGE_UNHANDLED_ERROR() |
260 IPC_END_MESSAGE_MAP() | 259 IPC_END_MESSAGE_MAP() |
261 | 260 |
262 return true; | 261 return true; |
263 } | 262 } |
OLD | NEW |