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

Unified Diff: ppapi/thunk/ppb_audio_thunk.cc

Issue 7585025: Reland 95309. Add a template to handle properly issuing completion callbacks. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 4 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/thunk/ppb_audio_api.h ('k') | ppapi/thunk/ppb_audio_trusted_api.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/thunk/ppb_audio_thunk.cc
===================================================================
--- ppapi/thunk/ppb_audio_thunk.cc (revision 95737)
+++ ppapi/thunk/ppb_audio_thunk.cc (working copy)
@@ -12,6 +12,8 @@
namespace {
+typedef EnterResource<PPB_Audio_API> EnterAudio;
+
PP_Resource Create(PP_Instance instance,
PP_Resource config_id,
PPB_Audio_Callback callback,
@@ -24,26 +26,26 @@
}
PP_Bool IsAudio(PP_Resource resource) {
- EnterResource<PPB_Audio_API> enter(resource, false);
+ EnterAudio enter(resource, false);
return enter.succeeded() ? PP_TRUE : PP_FALSE;
}
PP_Resource GetCurrentConfiguration(PP_Resource audio_id) {
- EnterResource<PPB_Audio_API> enter(audio_id, true);
+ EnterAudio enter(audio_id, true);
if (enter.failed())
return 0;
return enter.object()->GetCurrentConfig();
}
PP_Bool StartPlayback(PP_Resource audio_id) {
- EnterResource<PPB_Audio_API> enter(audio_id, true);
+ EnterAudio enter(audio_id, true);
if (enter.failed())
return PP_FALSE;
return enter.object()->StartPlayback();
}
PP_Bool StopPlayback(PP_Resource audio_id) {
- EnterResource<PPB_Audio_API> enter(audio_id, true);
+ EnterAudio enter(audio_id, true);
if (enter.failed())
return PP_FALSE;
return enter.object()->StopPlayback();
« no previous file with comments | « ppapi/thunk/ppb_audio_api.h ('k') | ppapi/thunk/ppb_audio_trusted_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698