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/gpu/gpu_process_host_ui_shim.h" | 5 #include "content/browser/gpu/gpu_process_host_ui_shim.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 } | 159 } |
160 | 160 |
161 void GpuProcessHostUIShim::SimulateCrash() { | 161 void GpuProcessHostUIShim::SimulateCrash() { |
162 Send(new GpuMsg_Crash()); | 162 Send(new GpuMsg_Crash()); |
163 } | 163 } |
164 | 164 |
165 void GpuProcessHostUIShim::SimulateHang() { | 165 void GpuProcessHostUIShim::SimulateHang() { |
166 Send(new GpuMsg_Hang()); | 166 Send(new GpuMsg_Hang()); |
167 } | 167 } |
168 | 168 |
| 169 #if defined(OS_ANDROID) |
| 170 void GpuProcessHostUIShim::SimulateJavaCrash() { |
| 171 Send(new GpuMsg_JavaCrash()); |
| 172 } |
| 173 #endif |
| 174 |
169 GpuProcessHostUIShim::~GpuProcessHostUIShim() { | 175 GpuProcessHostUIShim::~GpuProcessHostUIShim() { |
170 DCHECK(CalledOnValidThread()); | 176 DCHECK(CalledOnValidThread()); |
171 if (!close_callback_.is_null()) | 177 if (!close_callback_.is_null()) |
172 base::ResetAndReturn(&close_callback_).Run(); | 178 base::ResetAndReturn(&close_callback_).Run(); |
173 g_hosts_by_id.Pointer()->Remove(host_id_); | 179 g_hosts_by_id.Pointer()->Remove(host_id_); |
174 } | 180 } |
175 | 181 |
176 bool GpuProcessHostUIShim::OnControlMessageReceived( | 182 bool GpuProcessHostUIShim::OnControlMessageReceived( |
177 const IPC::Message& message) { | 183 const IPC::Message& message) { |
178 DCHECK(CalledOnValidThread()); | 184 DCHECK(CalledOnValidThread()); |
(...skipping 28 matching lines...) Expand all Loading... |
207 GpuDataManagerImpl::GetInstance()->UpdateGpuInfo(gpu_info); | 213 GpuDataManagerImpl::GetInstance()->UpdateGpuInfo(gpu_info); |
208 } | 214 } |
209 | 215 |
210 void GpuProcessHostUIShim::OnVideoMemoryUsageStatsReceived( | 216 void GpuProcessHostUIShim::OnVideoMemoryUsageStatsReceived( |
211 const gpu::VideoMemoryUsageStats& video_memory_usage_stats) { | 217 const gpu::VideoMemoryUsageStats& video_memory_usage_stats) { |
212 GpuDataManagerImpl::GetInstance()->UpdateVideoMemoryUsageStats( | 218 GpuDataManagerImpl::GetInstance()->UpdateVideoMemoryUsageStats( |
213 video_memory_usage_stats); | 219 video_memory_usage_stats); |
214 } | 220 } |
215 | 221 |
216 } // namespace content | 222 } // namespace content |
OLD | NEW |