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

Unified Diff: ppapi/shared_impl/ppb_video_capture_shared.cc

Issue 10081020: PPAPI: Make blocking completion callbacks work. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: export AssertLockHeld Created 8 years, 6 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/shared_impl/ppb_video_capture_shared.h ('k') | ppapi/shared_impl/ppb_video_decoder_shared.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/shared_impl/ppb_video_capture_shared.cc
diff --git a/ppapi/shared_impl/ppb_video_capture_shared.cc b/ppapi/shared_impl/ppb_video_capture_shared.cc
index 08f6bb249412d8ef368ca1890ce02d9efa90e584..962b060d861a730d567d6bc6731a0973b767cbe6 100644
--- a/ppapi/shared_impl/ppb_video_capture_shared.cc
+++ b/ppapi/shared_impl/ppb_video_capture_shared.cc
@@ -37,9 +37,7 @@ thunk::PPB_VideoCapture_API* PPB_VideoCapture_Shared::AsPPB_VideoCapture_API() {
int32_t PPB_VideoCapture_Shared::EnumerateDevices(
PP_Resource* devices,
- const PP_CompletionCallback& callback) {
- if (!callback.func)
- return PP_ERROR_BLOCKS_MAIN_THREAD;
+ scoped_refptr<TrackedCallback> callback) {
if (TrackedCallback::IsPending(enumerate_devices_callback_))
return PP_ERROR_INPROGRESS;
@@ -50,7 +48,7 @@ int32_t PPB_VideoCapture_Shared::Open(
const std::string& device_id,
const PP_VideoCaptureDeviceInfo_Dev& requested_info,
uint32_t buffer_count,
- const PP_CompletionCallback& callback) {
+ scoped_refptr<TrackedCallback> callback) {
if (open_state_ != BEFORE_OPEN)
return PP_ERROR_FAILED;
« no previous file with comments | « ppapi/shared_impl/ppb_video_capture_shared.h ('k') | ppapi/shared_impl/ppb_video_decoder_shared.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698