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/common/child_process_logging.h" | 10 #include "chrome/common/child_process_logging.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 | 27 |
28 } // namespace | 28 } // namespace |
29 | 29 |
30 GpuProcessHostUIShim::GpuProcessHostUIShim() : last_routing_id_(1) { | 30 GpuProcessHostUIShim::GpuProcessHostUIShim() : last_routing_id_(1) { |
31 } | 31 } |
32 | 32 |
33 GpuProcessHostUIShim::~GpuProcessHostUIShim() { | 33 GpuProcessHostUIShim::~GpuProcessHostUIShim() { |
34 } | 34 } |
35 | 35 |
36 // static | 36 // static |
37 GpuProcessHostUIShim* GpuProcessHostUIShim::Get() { | 37 GpuProcessHostUIShim* GpuProcessHostUIShim::GetInstance() { |
38 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 38 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
39 return Singleton<GpuProcessHostUIShim>::get(); | 39 return Singleton<GpuProcessHostUIShim>::get(); |
40 } | 40 } |
41 | 41 |
42 bool GpuProcessHostUIShim::Send(IPC::Message* msg) { | 42 bool GpuProcessHostUIShim::Send(IPC::Message* msg) { |
43 DCHECK(CalledOnValidThread()); | 43 DCHECK(CalledOnValidThread()); |
44 BrowserThread::PostTask(BrowserThread::IO, | 44 BrowserThread::PostTask(BrowserThread::IO, |
45 FROM_HERE, | 45 FROM_HERE, |
46 new SendOnIOThreadTask(msg)); | 46 new SendOnIOThreadTask(msg)); |
47 return true; | 47 return true; |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 IPC_BEGIN_MESSAGE_MAP(GpuProcessHostUIShim, message) | 122 IPC_BEGIN_MESSAGE_MAP(GpuProcessHostUIShim, message) |
123 IPC_MESSAGE_HANDLER(GpuHostMsg_GraphicsInfoCollected, | 123 IPC_MESSAGE_HANDLER(GpuHostMsg_GraphicsInfoCollected, |
124 OnGraphicsInfoCollected) | 124 OnGraphicsInfoCollected) |
125 #if defined(OS_WIN) | 125 #if defined(OS_WIN) |
126 IPC_MESSAGE_HANDLER(GpuHostMsg_ScheduleComposite, | 126 IPC_MESSAGE_HANDLER(GpuHostMsg_ScheduleComposite, |
127 OnScheduleComposite); | 127 OnScheduleComposite); |
128 #endif | 128 #endif |
129 IPC_MESSAGE_UNHANDLED_ERROR() | 129 IPC_MESSAGE_UNHANDLED_ERROR() |
130 IPC_END_MESSAGE_MAP() | 130 IPC_END_MESSAGE_MAP() |
131 } | 131 } |
OLD | NEW |