Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(686)

Side by Side Diff: ppapi/proxy/ppb_video_decoder_proxy.cc

Issue 11365235: Add PPAPI permissions for file chooser, PDF, testing, video capture, and video decode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/proxy/ppb_video_capture_proxy.cc ('k') | ppapi/proxy/ppp_printing_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
158 bool handled = true; 161 bool handled = true;
159 IPC_BEGIN_MESSAGE_MAP(PPB_VideoDecoder_Proxy, msg) 162 IPC_BEGIN_MESSAGE_MAP(PPB_VideoDecoder_Proxy, msg)
160 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBVideoDecoder_Create, 163 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBVideoDecoder_Create,
161 OnMsgCreate) 164 OnMsgCreate)
162 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBVideoDecoder_Decode, OnMsgDecode) 165 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBVideoDecoder_Decode, OnMsgDecode)
163 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBVideoDecoder_AssignPictureBuffers, 166 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBVideoDecoder_AssignPictureBuffers,
164 OnMsgAssignPictureBuffers) 167 OnMsgAssignPictureBuffers)
165 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBVideoDecoder_ReusePictureBuffer, 168 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBVideoDecoder_ReusePictureBuffer,
166 OnMsgReusePictureBuffer) 169 OnMsgReusePictureBuffer)
167 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBVideoDecoder_Flush, OnMsgFlush) 170 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBVideoDecoder_Flush, OnMsgFlush)
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 309
307 void PPB_VideoDecoder_Proxy::OnMsgResetACK( 310 void PPB_VideoDecoder_Proxy::OnMsgResetACK(
308 const HostResource& decoder, int32_t result) { 311 const HostResource& decoder, int32_t result) {
309 EnterPluginFromHostResource<PPB_VideoDecoder_API> enter(decoder); 312 EnterPluginFromHostResource<PPB_VideoDecoder_API> enter(decoder);
310 if (enter.succeeded()) 313 if (enter.succeeded())
311 static_cast<VideoDecoder*>(enter.object())->ResetACK(result); 314 static_cast<VideoDecoder*>(enter.object())->ResetACK(result);
312 } 315 }
313 316
314 } // namespace proxy 317 } // namespace proxy
315 } // namespace ppapi 318 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/ppb_video_capture_proxy.cc ('k') | ppapi/proxy/ppp_printing_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698