| 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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 | 148 |
| 149 PPB_VideoDecoder_Proxy::PPB_VideoDecoder_Proxy(Dispatcher* dispatcher) | 149 PPB_VideoDecoder_Proxy::PPB_VideoDecoder_Proxy(Dispatcher* dispatcher) |
| 150 : InterfaceProxy(dispatcher), | 150 : InterfaceProxy(dispatcher), |
| 151 callback_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) { | 151 callback_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) { |
| 152 } | 152 } |
| 153 | 153 |
| 154 PPB_VideoDecoder_Proxy::~PPB_VideoDecoder_Proxy() { | 154 PPB_VideoDecoder_Proxy::~PPB_VideoDecoder_Proxy() { |
| 155 } | 155 } |
| 156 | 156 |
| 157 bool PPB_VideoDecoder_Proxy::OnMessageReceived(const IPC::Message& msg) { | 157 bool PPB_VideoDecoder_Proxy::OnMessageReceived(const IPC::Message& msg) { |
| 158 if (!dispatcher()->permissions().HasPermission(PERMISSION_DEV)) | |
| 159 return false; | |
| 160 | |
| 161 bool handled = true; | 158 bool handled = true; |
| 162 IPC_BEGIN_MESSAGE_MAP(PPB_VideoDecoder_Proxy, msg) | 159 IPC_BEGIN_MESSAGE_MAP(PPB_VideoDecoder_Proxy, msg) |
| 163 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBVideoDecoder_Create, | 160 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBVideoDecoder_Create, |
| 164 OnMsgCreate) | 161 OnMsgCreate) |
| 165 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBVideoDecoder_Decode, OnMsgDecode) | 162 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBVideoDecoder_Decode, OnMsgDecode) |
| 166 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBVideoDecoder_AssignPictureBuffers, | 163 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBVideoDecoder_AssignPictureBuffers, |
| 167 OnMsgAssignPictureBuffers) | 164 OnMsgAssignPictureBuffers) |
| 168 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBVideoDecoder_ReusePictureBuffer, | 165 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBVideoDecoder_ReusePictureBuffer, |
| 169 OnMsgReusePictureBuffer) | 166 OnMsgReusePictureBuffer) |
| 170 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBVideoDecoder_Flush, OnMsgFlush) | 167 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBVideoDecoder_Flush, OnMsgFlush) |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 | 306 |
| 310 void PPB_VideoDecoder_Proxy::OnMsgResetACK( | 307 void PPB_VideoDecoder_Proxy::OnMsgResetACK( |
| 311 const HostResource& decoder, int32_t result) { | 308 const HostResource& decoder, int32_t result) { |
| 312 EnterPluginFromHostResource<PPB_VideoDecoder_API> enter(decoder); | 309 EnterPluginFromHostResource<PPB_VideoDecoder_API> enter(decoder); |
| 313 if (enter.succeeded()) | 310 if (enter.succeeded()) |
| 314 static_cast<VideoDecoder*>(enter.object())->ResetACK(result); | 311 static_cast<VideoDecoder*>(enter.object())->ResetACK(result); |
| 315 } | 312 } |
| 316 | 313 |
| 317 } // namespace proxy | 314 } // namespace proxy |
| 318 } // namespace ppapi | 315 } // namespace ppapi |
| OLD | NEW |