| 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 "base/unguessable_token.h" | 7 #include "base/unguessable_token.h" |
| 8 #include "content/renderer/render_thread_impl.h" | 8 #include "content/renderer/render_thread_impl.h" |
| 9 #include "gpu/ipc/client/gpu_channel_host.h" | 9 #include "gpu/ipc/client/gpu_channel_host.h" |
| 10 #include "gpu/ipc/common/gpu_messages.h" | 10 #include "gpu/ipc/common/gpu_messages.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 | 51 |
| 52 void StreamTextureHost::OnChannelError() { | 52 void StreamTextureHost::OnChannelError() { |
| 53 channel_ = nullptr; | 53 channel_ = nullptr; |
| 54 } | 54 } |
| 55 | 55 |
| 56 void StreamTextureHost::OnFrameAvailable() { | 56 void StreamTextureHost::OnFrameAvailable() { |
| 57 if (listener_) | 57 if (listener_) |
| 58 listener_->OnFrameAvailable(); | 58 listener_->OnFrameAvailable(); |
| 59 } | 59 } |
| 60 | 60 |
| 61 void StreamTextureHost::EstablishPeer(int player_id, int frame_id) { | |
| 62 if (channel_) { | |
| 63 channel_->Send( | |
| 64 new GpuStreamTextureMsg_EstablishPeer(route_id_, frame_id, player_id)); | |
| 65 } | |
| 66 } | |
| 67 | |
| 68 void StreamTextureHost::SetStreamTextureSize(const gfx::Size& size) { | 61 void StreamTextureHost::SetStreamTextureSize(const gfx::Size& size) { |
| 69 if (channel_) | 62 if (channel_) |
| 70 channel_->Send(new GpuStreamTextureMsg_SetSize(route_id_, size)); | 63 channel_->Send(new GpuStreamTextureMsg_SetSize(route_id_, size)); |
| 71 } | 64 } |
| 72 | 65 |
| 73 void StreamTextureHost::ForwardStreamTextureForSurfaceRequest( | 66 void StreamTextureHost::ForwardStreamTextureForSurfaceRequest( |
| 74 const base::UnguessableToken& request_token) { | 67 const base::UnguessableToken& request_token) { |
| 75 if (channel_) { | 68 if (channel_) { |
| 76 channel_->Send(new GpuStreamTextureMsg_ForwardForSurfaceRequest( | 69 channel_->Send(new GpuStreamTextureMsg_ForwardForSurfaceRequest( |
| 77 route_id_, request_token)); | 70 route_id_, request_token)); |
| 78 } | 71 } |
| 79 } | 72 } |
| 80 | 73 |
| 81 } // namespace content | 74 } // namespace content |
| OLD | NEW |