summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornfullagar@google.com <nfullagar@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-30 18:52:41 +0000
committernfullagar@google.com <nfullagar@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-30 18:52:41 +0000
commit7b33902700498cda1c9b045a6e9147cf5f66cef7 (patch)
tree21389892ffdf61b2054a0f835a487cc7d19d1d36
parentf67956032b6a07388d476803a7f7a0363dd376d9 (diff)
downloadchromium_src-7b33902700498cda1c9b045a6e9147cf5f66cef7.zip
chromium_src-7b33902700498cda1c9b045a6e9147cf5f66cef7.tar.gz
chromium_src-7b33902700498cda1c9b045a6e9147cf5f66cef7.tar.bz2
Cleanup
- change comment style in ppb_audio_trusted_dev.h to c style - change shm_size to uint32_t to match other interfaces BUG=none TEST=src/ppapi/examples/audio/audio.cc Review URL: http://codereview.chromium.org/5292010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67730 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--ppapi/c/dev/ppb_audio_trusted_dev.h38
-rw-r--r--webkit/glue/plugins/pepper_audio.cc4
-rw-r--r--webkit/glue/plugins/pepper_audio.h2
3 files changed, 26 insertions, 18 deletions
diff --git a/ppapi/c/dev/ppb_audio_trusted_dev.h b/ppapi/c/dev/ppb_audio_trusted_dev.h
index 4c250b6..aab83fe 100644
--- a/ppapi/c/dev/ppb_audio_trusted_dev.h
+++ b/ppapi/c/dev/ppb_audio_trusted_dev.h
@@ -11,31 +11,39 @@
#define PPB_AUDIO_TRUSTED_DEV_INTERFACE "PPB_AudioTrusted(Dev);0.2"
-// This interface is to be used by proxy implementations. All
-// functions should be called from the main thread only. The
-// resource returned is an Audio resource; most of the PPB_Audio_Dev
-// interface is also usable on this resource.
+/**
+ * This interface is to be used by proxy implementations. All
+ * functions should be called from the main thread only. The
+ * resource returned is an Audio resource; most of the PPB_Audio_Dev
+ * interface is also usable on this resource.
+ */
struct PPB_AudioTrusted_Dev {
- // Returns an audio resource.
+ /** Returns an audio resource. */
PP_Resource (*CreateTrusted)(PP_Instance instance);
- // Opens a paused audio interface, used by trusted side of proxy.
- // Returns PP_ERROR_WOULD_BLOCK on success, and invokes
- // the |create_callback| asynchronously to complete.
- // As this function should always be invoked from the main thread,
- // do not use the blocking variant of PP_CompletionCallback.
+ /**
+ * Opens a paused audio interface, used by trusted side of proxy.
+ * Returns PP_ERROR_WOULD_BLOCK on success, and invokes
+ * the |create_callback| asynchronously to complete.
+ * As this function should always be invoked from the main thread,
+ * do not use the blocking variant of PP_CompletionCallback.
+ */
int32_t (*Open)(PP_Resource audio, PP_Resource config,
struct PP_CompletionCallback create_callback);
- // Get the sync socket. Use once Open has completed.
- // Returns PP_OK on success.
+ /**
+ * Get the sync socket. Use once Open has completed.
+ * Returns PP_OK on success.
+ */
int32_t (*GetSyncSocket)(PP_Resource audio, int* sync_socket);
- // Get the shared memory interface. Use once Open has completed.
- // Returns PP_OK on success.
+ /**
+ * Get the shared memory interface. Use once Open has completed.
+ * Returns PP_OK on success.
+ */
int32_t (*GetSharedMemory)(PP_Resource audio,
int* shm_handle,
- int32_t* shm_size);
+ uint32_t* shm_size);
};
#endif // PPAPI_C_DEV_PPB_AUDIO_TRUSTED_DEV_H_
diff --git a/webkit/glue/plugins/pepper_audio.cc b/webkit/glue/plugins/pepper_audio.cc
index 1731d8a..0b0999a 100644
--- a/webkit/glue/plugins/pepper_audio.cc
+++ b/webkit/glue/plugins/pepper_audio.cc
@@ -153,7 +153,7 @@ int32_t GetSyncSocket(PP_Resource audio_id, int* sync_socket) {
int32_t GetSharedMemory(PP_Resource audio_id,
int* shm_handle,
- int32_t* shm_size) {
+ uint32_t* shm_size) {
scoped_refptr<Audio> audio = Resource::GetAs<Audio>(audio_id);
if (audio)
return audio->GetSharedMemory(shm_handle, shm_size);
@@ -300,7 +300,7 @@ int32_t Audio::GetSyncSocket(int* sync_socket) {
return PP_ERROR_FAILED;
}
-int32_t Audio::GetSharedMemory(int* shm_handle, int32_t* shm_size) {
+int32_t Audio::GetSharedMemory(int* shm_handle, uint32_t* shm_size) {
if (shared_memory_ != NULL) {
#if defined(OS_POSIX)
*shm_handle = shared_memory_->handle().fd;
diff --git a/webkit/glue/plugins/pepper_audio.h b/webkit/glue/plugins/pepper_audio.h
index 8c14666..3b4a8cc 100644
--- a/webkit/glue/plugins/pepper_audio.h
+++ b/webkit/glue/plugins/pepper_audio.h
@@ -71,7 +71,7 @@ class Audio : public Resource,
int32_t GetSyncSocket(int* sync_socket);
- int32_t GetSharedMemory(int* shm_handle, int32_t* shm_size);
+ int32_t GetSharedMemory(int* shm_handle, uint32_t* shm_size);
bool StartPlayback();