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 |