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

Unified Diff: ppapi/thunk/ppb_audio_thunk.cc

Issue 11316335: Autogenerate thunk .cc file for PPB_Audio. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years 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/api/ppb_audio.idl ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/thunk/ppb_audio_thunk.cc
diff --git a/ppapi/thunk/ppb_audio_thunk.cc b/ppapi/thunk/ppb_audio_thunk.cc
index 28740e5a61d663242d068a97eeaada91a170bc08..d591cb842ca17fc1d4839e7dd51fe3e61ef0c746 100644
--- a/ppapi/thunk/ppb_audio_thunk.cc
+++ b/ppapi/thunk/ppb_audio_thunk.cc
@@ -2,67 +2,73 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ppapi/thunk/thunk.h"
+// From ppb_audio.idl modified Tue Dec 4 10:41:02 2012.
+
+#include "ppapi/c/pp_errors.h"
+#include "ppapi/c/ppb_audio.h"
+#include "ppapi/shared_impl/tracked_callback.h"
#include "ppapi/thunk/enter.h"
#include "ppapi/thunk/ppb_audio_api.h"
+#include "ppapi/thunk/ppb_instance_api.h"
#include "ppapi/thunk/resource_creation_api.h"
+#include "ppapi/thunk/thunk.h"
namespace ppapi {
namespace thunk {
namespace {
-typedef EnterResource<PPB_Audio_API> EnterAudio;
-
PP_Resource Create(PP_Instance instance,
- PP_Resource config_id,
- PPB_Audio_Callback callback,
+ PP_Resource config,
+ PPB_Audio_Callback audio_callback,
void* user_data) {
EnterResourceCreation enter(instance);
if (enter.failed())
return 0;
- return enter.functions()->CreateAudio(instance, config_id,
- callback, user_data);
+ return enter.functions()->CreateAudio(instance,
+ config,
+ audio_callback,
+ user_data);
}
PP_Bool IsAudio(PP_Resource resource) {
- EnterAudio enter(resource, false);
- return enter.succeeded() ? PP_TRUE : PP_FALSE;
+ EnterResource<PPB_Audio_API> enter(resource, false);
+ return PP_FromBool(enter.succeeded());
}
-PP_Resource GetCurrentConfiguration(PP_Resource audio_id) {
- EnterAudio enter(audio_id, true);
+PP_Resource GetCurrentConfig(PP_Resource audio) {
+ EnterResource<PPB_Audio_API> enter(audio, true);
if (enter.failed())
return 0;
return enter.object()->GetCurrentConfig();
}
-PP_Bool StartPlayback(PP_Resource audio_id) {
- EnterAudio enter(audio_id, true);
+PP_Bool StartPlayback(PP_Resource audio) {
+ EnterResource<PPB_Audio_API> enter(audio, true);
if (enter.failed())
return PP_FALSE;
return enter.object()->StartPlayback();
}
-PP_Bool StopPlayback(PP_Resource audio_id) {
- EnterAudio enter(audio_id, true);
+PP_Bool StopPlayback(PP_Resource audio) {
+ EnterResource<PPB_Audio_API> enter(audio, true);
if (enter.failed())
return PP_FALSE;
return enter.object()->StopPlayback();
}
-const PPB_Audio g_ppb_audio_thunk = {
+const PPB_Audio_1_0 g_ppb_audio_thunk_1_0 = {
&Create,
&IsAudio,
- &GetCurrentConfiguration,
+ &GetCurrentConfig,
&StartPlayback,
- &StopPlayback
+ &StopPlayback,
};
} // namespace
const PPB_Audio_1_0* GetPPB_Audio_1_0_Thunk() {
- return &g_ppb_audio_thunk;
+ return &g_ppb_audio_thunk_1_0;
}
} // namespace thunk
« no previous file with comments | « ppapi/api/ppb_audio.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698