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 "ppapi/proxy/ppb_video_decoder_proxy.h" | 5 #include "ppapi/proxy/ppb_video_decoder_proxy.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "gpu/command_buffer/client/gles2_implementation.h" | 8 #include "gpu/command_buffer/client/gles2_implementation.h" |
9 #include "ppapi/proxy/enter_proxy.h" | 9 #include "ppapi/proxy/enter_proxy.h" |
10 #include "ppapi/proxy/plugin_dispatcher.h" | 10 #include "ppapi/proxy/plugin_dispatcher.h" |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 RunFlushCallback(result); | 143 RunFlushCallback(result); |
144 } | 144 } |
145 | 145 |
146 void VideoDecoder::EndOfBitstreamACK( | 146 void VideoDecoder::EndOfBitstreamACK( |
147 int32_t bitstream_buffer_id, int32_t result) { | 147 int32_t bitstream_buffer_id, int32_t result) { |
148 RunBitstreamBufferCallback(bitstream_buffer_id, result); | 148 RunBitstreamBufferCallback(bitstream_buffer_id, result); |
149 } | 149 } |
150 | 150 |
151 PPB_VideoDecoder_Proxy::PPB_VideoDecoder_Proxy(Dispatcher* dispatcher) | 151 PPB_VideoDecoder_Proxy::PPB_VideoDecoder_Proxy(Dispatcher* dispatcher) |
152 : InterfaceProxy(dispatcher), | 152 : InterfaceProxy(dispatcher), |
153 callback_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) { | 153 callback_factory_(this) { |
154 } | 154 } |
155 | 155 |
156 PPB_VideoDecoder_Proxy::~PPB_VideoDecoder_Proxy() { | 156 PPB_VideoDecoder_Proxy::~PPB_VideoDecoder_Proxy() { |
157 } | 157 } |
158 | 158 |
159 bool PPB_VideoDecoder_Proxy::OnMessageReceived(const IPC::Message& msg) { | 159 bool PPB_VideoDecoder_Proxy::OnMessageReceived(const IPC::Message& msg) { |
160 if (!dispatcher()->permissions().HasPermission(PERMISSION_DEV)) | 160 if (!dispatcher()->permissions().HasPermission(PERMISSION_DEV)) |
161 return false; | 161 return false; |
162 | 162 |
163 bool handled = true; | 163 bool handled = true; |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 | 311 |
312 void PPB_VideoDecoder_Proxy::OnMsgResetACK( | 312 void PPB_VideoDecoder_Proxy::OnMsgResetACK( |
313 const HostResource& decoder, int32_t result) { | 313 const HostResource& decoder, int32_t result) { |
314 EnterPluginFromHostResource<PPB_VideoDecoder_API> enter(decoder); | 314 EnterPluginFromHostResource<PPB_VideoDecoder_API> enter(decoder); |
315 if (enter.succeeded()) | 315 if (enter.succeeded()) |
316 static_cast<VideoDecoder*>(enter.object())->ResetACK(result); | 316 static_cast<VideoDecoder*>(enter.object())->ResetACK(result); |
317 } | 317 } |
318 | 318 |
319 } // namespace proxy | 319 } // namespace proxy |
320 } // namespace ppapi | 320 } // namespace ppapi |
OLD | NEW |