| 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/command_line.h" | 10 #include "base/command_line.h" | 
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 171 } | 171 } | 
| 172 | 172 | 
| 173 void GpuProcessHostUIShim::SimulateCrash() { | 173 void GpuProcessHostUIShim::SimulateCrash() { | 
| 174   Send(new GpuMsg_Crash()); | 174   Send(new GpuMsg_Crash()); | 
| 175 } | 175 } | 
| 176 | 176 | 
| 177 void GpuProcessHostUIShim::SimulateHang() { | 177 void GpuProcessHostUIShim::SimulateHang() { | 
| 178   Send(new GpuMsg_Hang()); | 178   Send(new GpuMsg_Hang()); | 
| 179 } | 179 } | 
| 180 | 180 | 
|  | 181 #if defined(TOOLKIT_GTK) | 
|  | 182 void GpuProcessHostUIShim::AcceleratedCompositingStateChange( | 
|  | 183     int32 surface_id, bool compositing_active) { | 
|  | 184   Send(new GpuMsg_AcceleratedCompositingStateChange( | 
|  | 185       surface_id, compositing_active)); | 
|  | 186 } | 
|  | 187 #endif | 
|  | 188 | 
| 181 GpuProcessHostUIShim::~GpuProcessHostUIShim() { | 189 GpuProcessHostUIShim::~GpuProcessHostUIShim() { | 
| 182   DCHECK(CalledOnValidThread()); | 190   DCHECK(CalledOnValidThread()); | 
| 183   g_hosts_by_id.Pointer()->Remove(host_id_); | 191   g_hosts_by_id.Pointer()->Remove(host_id_); | 
| 184 } | 192 } | 
| 185 | 193 | 
| 186 bool GpuProcessHostUIShim::OnControlMessageReceived( | 194 bool GpuProcessHostUIShim::OnControlMessageReceived( | 
| 187     const IPC::Message& message) { | 195     const IPC::Message& message) { | 
| 188   DCHECK(CalledOnValidThread()); | 196   DCHECK(CalledOnValidThread()); | 
| 189 | 197 | 
| 190   IPC_BEGIN_MESSAGE_MAP(GpuProcessHostUIShim, message) | 198   IPC_BEGIN_MESSAGE_MAP(GpuProcessHostUIShim, message) | 
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 392   view->AcceleratedSurfaceRelease(); | 400   view->AcceleratedSurfaceRelease(); | 
| 393 } | 401 } | 
| 394 | 402 | 
| 395 void GpuProcessHostUIShim::OnVideoMemoryUsageStatsReceived( | 403 void GpuProcessHostUIShim::OnVideoMemoryUsageStatsReceived( | 
| 396     const GPUVideoMemoryUsageStats& video_memory_usage_stats) { | 404     const GPUVideoMemoryUsageStats& video_memory_usage_stats) { | 
| 397   GpuDataManagerImpl::GetInstance()->UpdateVideoMemoryUsageStats( | 405   GpuDataManagerImpl::GetInstance()->UpdateVideoMemoryUsageStats( | 
| 398       video_memory_usage_stats); | 406       video_memory_usage_stats); | 
| 399 } | 407 } | 
| 400 | 408 | 
| 401 }  // namespace content | 409 }  // namespace content | 
| OLD | NEW | 
|---|