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

Unified Diff: webkit/glue/plugins/pepper_audio.cc

Issue 4310002: Make PPAPI headers compile with C compilers (gcc on Linux & Mac and MSVS on W... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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/glue/plugins/pepper_audio.h ('k') | webkit/glue/plugins/pepper_buffer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/plugins/pepper_audio.cc
===================================================================
--- webkit/glue/plugins/pepper_audio.cc (revision 65116)
+++ webkit/glue/plugins/pepper_audio.cc (working copy)
@@ -7,6 +7,7 @@
#include "base/logging.h"
#include "ppapi/c/dev/ppb_audio_dev.h"
#include "ppapi/c/dev/ppb_audio_trusted_dev.h"
+#include "webkit/glue/plugins/pepper_common.h"
namespace pepper {
@@ -50,9 +51,9 @@
return requested_sample_frame_count;
}
-bool IsAudioConfig(PP_Resource resource) {
+PP_Bool IsAudioConfig(PP_Resource resource) {
scoped_refptr<AudioConfig> config = Resource::GetAs<AudioConfig>(resource);
- return !!config;
+ return BoolToPPBool(!!config);
}
PP_AudioSampleRate_Dev GetSampleRate(PP_Resource config_id) {
@@ -87,9 +88,9 @@
return audio->GetReference();
}
-bool IsAudio(PP_Resource resource) {
+PP_Bool IsAudio(PP_Resource resource) {
scoped_refptr<Audio> audio = Resource::GetAs<Audio>(resource);
- return !!audio;
+ return BoolToPPBool(!!audio);
}
PP_Resource GetCurrentConfiguration(PP_Resource audio_id) {
@@ -97,14 +98,14 @@
return audio ? audio->GetCurrentConfiguration() : 0;
}
-bool StartPlayback(PP_Resource audio_id) {
+PP_Bool StartPlayback(PP_Resource audio_id) {
scoped_refptr<Audio> audio = Resource::GetAs<Audio>(audio_id);
- return audio ? audio->StartPlayback() : false;
+ return audio ? BoolToPPBool(audio->StartPlayback()) : PP_FALSE;
}
-bool StopPlayback(PP_Resource audio_id) {
+PP_Bool StopPlayback(PP_Resource audio_id) {
scoped_refptr<Audio> audio = Resource::GetAs<Audio>(audio_id);
- return audio ? audio->StopPlayback() : false;
+ return audio ? BoolToPPBool(audio->StopPlayback()) : PP_FALSE;
}
const PPB_Audio_Dev ppb_audio = {
« no previous file with comments | « webkit/glue/plugins/pepper_audio.h ('k') | webkit/glue/plugins/pepper_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698