| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/renderer/gpu_surface_proxy.h" | 5 #include "content/renderer/gpu/gpu_surface_proxy.h" |
| 6 #include "ui/gfx/size.h" | 6 #include "ui/gfx/size.h" |
| 7 | 7 |
| 8 GpuSurfaceProxy::GpuSurfaceProxy( | 8 GpuSurfaceProxy::GpuSurfaceProxy( |
| 9 IPC::Channel::Sender* channel, | 9 IPC::Channel::Sender* channel, |
| 10 int route_id) | 10 int route_id) |
| 11 : channel_(channel), | 11 : channel_(channel), |
| 12 route_id_(route_id) { | 12 route_id_(route_id) { |
| 13 } | 13 } |
| 14 | 14 |
| 15 GpuSurfaceProxy::~GpuSurfaceProxy() { | 15 GpuSurfaceProxy::~GpuSurfaceProxy() { |
| 16 } | 16 } |
| 17 | 17 |
| 18 bool GpuSurfaceProxy::OnMessageReceived(const IPC::Message& message) { | 18 bool GpuSurfaceProxy::OnMessageReceived(const IPC::Message& message) { |
| 19 bool handled = true; | 19 bool handled = true; |
| 20 //IPC_BEGIN_MESSAGE_MAP(GpuSurfaceProxy, message) | 20 //IPC_BEGIN_MESSAGE_MAP(GpuSurfaceProxy, message) |
| 21 // IPC_MESSAGE_UNHANDLED(handled = false) | 21 // IPC_MESSAGE_UNHANDLED(handled = false) |
| 22 //IPC_END_MESSAGE_MAP() | 22 //IPC_END_MESSAGE_MAP() |
| 23 DCHECK(handled); | 23 DCHECK(handled); |
| 24 return handled; | 24 return handled; |
| 25 } | 25 } |
| 26 | 26 |
| 27 void GpuSurfaceProxy::OnChannelError() { | 27 void GpuSurfaceProxy::OnChannelError() { |
| 28 // Prevent any further messages from being sent. | 28 // Prevent any further messages from being sent. |
| 29 channel_ = NULL; | 29 channel_ = NULL; |
| 30 } | 30 } |
| OLD | NEW |