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

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

Issue 11358247: Revert 167727 - Add PPAPI permissions for file chooser, PDF, testing, video capture, and video deco… (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_testing_proxy.cc ('k') | ppapi/proxy/ppb_video_decoder_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_capture_proxy.h" 5 #include "ppapi/proxy/ppb_video_capture_proxy.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "ppapi/c/pp_errors.h" 10 #include "ppapi/c/pp_errors.h"
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 295
296 HostResource result; 296 HostResource result;
297 dispatcher->Send(new PpapiHostMsg_PPBVideoCapture_Create( 297 dispatcher->Send(new PpapiHostMsg_PPBVideoCapture_Create(
298 API_ID_PPB_VIDEO_CAPTURE_DEV, instance, &result)); 298 API_ID_PPB_VIDEO_CAPTURE_DEV, instance, &result));
299 if (result.is_null()) 299 if (result.is_null())
300 return 0; 300 return 0;
301 return (new VideoCapture(result))->GetReference(); 301 return (new VideoCapture(result))->GetReference();
302 } 302 }
303 303
304 bool PPB_VideoCapture_Proxy::OnMessageReceived(const IPC::Message& msg) { 304 bool PPB_VideoCapture_Proxy::OnMessageReceived(const IPC::Message& msg) {
305 if (!dispatcher()->permissions().HasPermission(PERMISSION_DEV))
306 return false;
307
308 bool handled = true; 305 bool handled = true;
309 IPC_BEGIN_MESSAGE_MAP(PPB_VideoCapture_Proxy, msg) 306 IPC_BEGIN_MESSAGE_MAP(PPB_VideoCapture_Proxy, msg)
310 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBVideoCapture_Create, OnMsgCreate) 307 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBVideoCapture_Create, OnMsgCreate)
311 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBVideoCapture_EnumerateDevices, 308 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBVideoCapture_EnumerateDevices,
312 OnMsgEnumerateDevices) 309 OnMsgEnumerateDevices)
313 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBVideoCapture_Open, OnMsgOpen) 310 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBVideoCapture_Open, OnMsgOpen)
314 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBVideoCapture_StartCapture, 311 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBVideoCapture_StartCapture,
315 OnMsgStartCapture) 312 OnMsgStartCapture)
316 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBVideoCapture_ReuseBuffer, 313 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBVideoCapture_ReuseBuffer,
317 OnMsgReuseBuffer) 314 OnMsgReuseBuffer)
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 return; 534 return;
538 535
539 VideoCapture* capture = static_cast<VideoCapture*>(enter.object()); 536 VideoCapture* capture = static_cast<VideoCapture*>(enter.object());
540 capture->SetBufferInUse(buffer); 537 capture->SetBufferInUse(buffer);
541 CallWhileUnlocked(ppp_video_capture_impl_->OnBufferReady, 538 CallWhileUnlocked(ppp_video_capture_impl_->OnBufferReady,
542 host_resource.instance(), capture->pp_resource(), buffer); 539 host_resource.instance(), capture->pp_resource(), buffer);
543 } 540 }
544 541
545 } // namespace proxy 542 } // namespace proxy
546 } // namespace ppapi 543 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/ppb_testing_proxy.cc ('k') | ppapi/proxy/ppb_video_decoder_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698