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

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: 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 | « webkit/plugins/ppapi/ppb_audio_impl.h ('k') | webkit/plugins/ppapi/ppb_audio_input_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 f5b64adf9e05b6e061f39b5306f44317207c56c3..7024aea93c5f1dcfe44d1399302575be6b6eaf3b 100644
--- a/webkit/plugins/ppapi/ppb_audio_impl.cc
+++ b/webkit/plugins/ppapi/ppb_audio_impl.cc
@@ -112,8 +112,9 @@ PP_Bool PPB_Audio_Impl::StopPlayback() {
return PP_TRUE;
}
-int32_t PPB_Audio_Impl::OpenTrusted(PP_Resource config,
- PP_CompletionCallback create_callback) {
+int32_t PPB_Audio_Impl::OpenTrusted(
+ PP_Resource config,
+ scoped_refptr<TrackedCallback> 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;
}
« no previous file with comments | « webkit/plugins/ppapi/ppb_audio_impl.h ('k') | webkit/plugins/ppapi/ppb_audio_input_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698