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

Unified Diff: webkit/plugins/ppapi/ppb_audio_impl.cc

Issue 10081020: PPAPI: Make blocking completion callbacks work. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated TestURLLoader to test blocking callbacks. 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: webkit/plugins/ppapi/ppb_audio_impl.cc
diff --git a/webkit/plugins/ppapi/ppb_audio_impl.cc b/webkit/plugins/ppapi/ppb_audio_impl.cc
index 6e5115fe6e9cf872e9b5bcf54042ce6c44fa062f..aabb517269141ab8fa4491ce515d03f998fe4488 100644
--- a/webkit/plugins/ppapi/ppb_audio_impl.cc
+++ b/webkit/plugins/ppapi/ppb_audio_impl.cc
@@ -17,6 +17,7 @@
#include "webkit/plugins/ppapi/common.h"
#include "webkit/plugins/ppapi/resource_helper.h"
+using ppapi::ApiCallbackType;
using ppapi::PpapiGlobals;
using ppapi::thunk::EnterResourceNoLock;
using ppapi::thunk::PPB_Audio_API;
@@ -113,7 +114,7 @@ PP_Bool PPB_Audio_Impl::StopPlayback() {
}
int32_t PPB_Audio_Impl::OpenTrusted(PP_Resource config,
- PP_CompletionCallback create_callback) {
+ ApiCallbackType create_callback) {
// Validate the config and keep a reference to it.
EnterResourceNoLock<PPB_AudioConfig_API> enter(config, true);
if (enter.failed())
@@ -135,7 +136,7 @@ int32_t PPB_Audio_Impl::OpenTrusted(PP_Resource config,
// At this point, we are guaranteeing ownership of the completion
// callback. Audio promises to fire the completion callback
// once and only once.
- SetCreateCallback(new TrackedCallback(this, create_callback));
+ SetCreateCallback(create_callback);
return PP_OK_COMPLETIONPENDING;
}

Powered by Google App Engine
This is Rietveld 408576698