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

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: Cleaned up for review. Created 8 years, 8 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
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..9c73506e9c38c14cfd7d81272b3ebcc54f6c30fc 100644
--- a/ppapi/shared_impl/ppb_video_capture_shared.cc
+++ b/ppapi/shared_impl/ppb_video_capture_shared.cc
@@ -35,11 +35,8 @@ thunk::PPB_VideoCapture_API* PPB_VideoCapture_Shared::AsPPB_VideoCapture_API() {
return this;
}
-int32_t PPB_VideoCapture_Shared::EnumerateDevices(
- PP_Resource* devices,
- const PP_CompletionCallback& callback) {
- if (!callback.func)
- return PP_ERROR_BLOCKS_MAIN_THREAD;
+int32_t PPB_VideoCapture_Shared::EnumerateDevices(PP_Resource* devices,
+ ApiCallbackType callback) {
if (TrackedCallback::IsPending(enumerate_devices_callback_))
return PP_ERROR_INPROGRESS;
@@ -50,7 +47,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) {
+ ApiCallbackType callback) {
if (open_state_ != BEFORE_OPEN)
return PP_ERROR_FAILED;

Powered by Google App Engine
This is Rietveld 408576698