| 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/renderer/gpu/stream_texture_host_android.h" | 5 #include "content/renderer/gpu/stream_texture_host_android.h" |
| 6 | 6 |
| 7 #include "content/common/gpu/client/gpu_channel_host.h" | |
| 8 #include "content/renderer/render_thread_impl.h" | 7 #include "content/renderer/render_thread_impl.h" |
| 8 #include "gpu/ipc/client/gpu_channel_host.h" |
| 9 #include "gpu/ipc/common/gpu_messages.h" | 9 #include "gpu/ipc/common/gpu_messages.h" |
| 10 #include "ipc/ipc_message_macros.h" | 10 #include "ipc/ipc_message_macros.h" |
| 11 | 11 |
| 12 namespace content { | 12 namespace content { |
| 13 | 13 |
| 14 StreamTextureHost::StreamTextureHost(GpuChannelHost* channel) | 14 StreamTextureHost::StreamTextureHost(gpu::GpuChannelHost* channel) |
| 15 : stream_id_(0), | 15 : stream_id_(0), |
| 16 listener_(NULL), | 16 listener_(NULL), |
| 17 channel_(channel), | 17 channel_(channel), |
| 18 weak_ptr_factory_(this) { | 18 weak_ptr_factory_(this) { |
| 19 DCHECK(channel); | 19 DCHECK(channel); |
| 20 } | 20 } |
| 21 | 21 |
| 22 StreamTextureHost::~StreamTextureHost() { | 22 StreamTextureHost::~StreamTextureHost() { |
| 23 if (channel_.get() && stream_id_) | 23 if (channel_.get() && stream_id_) |
| 24 channel_->RemoveRoute(stream_id_); | 24 channel_->RemoveRoute(stream_id_); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 50 | 50 |
| 51 void StreamTextureHost::OnChannelError() { | 51 void StreamTextureHost::OnChannelError() { |
| 52 } | 52 } |
| 53 | 53 |
| 54 void StreamTextureHost::OnFrameAvailable() { | 54 void StreamTextureHost::OnFrameAvailable() { |
| 55 if (listener_) | 55 if (listener_) |
| 56 listener_->OnFrameAvailable(); | 56 listener_->OnFrameAvailable(); |
| 57 } | 57 } |
| 58 | 58 |
| 59 } // namespace content | 59 } // namespace content |
| OLD | NEW |