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

Unified Diff: ppapi/proxy/ppb_instance_proxy.cc

Issue 9129007: Work on improving PpbAudioConfig:RecommendSampleFrameCount (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 10 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
Index: ppapi/proxy/ppb_instance_proxy.cc
===================================================================
--- ppapi/proxy/ppb_instance_proxy.cc (revision 120806)
+++ ppapi/proxy/ppb_instance_proxy.cc (working copy)
@@ -6,6 +6,7 @@
#include "ppapi/c/pp_errors.h"
#include "ppapi/c/pp_var.h"
+#include "ppapi/c/ppb_audio_config.h"
#include "ppapi/c/ppb_instance.h"
#include "ppapi/c/ppb_messaging.h"
#include "ppapi/c/ppb_mouse_lock.h"
@@ -80,6 +81,10 @@
OnHostMsgBindGraphics)
IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_IsFullFrame,
OnHostMsgIsFullFrame)
+ IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_AudioHardwareOutputSampleRate,
+ OnHostMsgAudioHardwareOutputSampleRate)
+ IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_AudioHardwareOutputBufferSize,
+ OnHostMsgAudioHardwareOutputBufferSize)
IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_ExecuteScript,
OnHostMsgExecuteScript)
IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_GetDefaultCharSet,
@@ -183,6 +188,22 @@
return result.Return(dispatcher());
}
+uint32_t PPB_Instance_Proxy::
brettw 2012/02/10 19:01:33 Style: Don't wrap after the :: if you don't need t
nfullagar 2012/02/14 00:42:37 Done.
+ AudioHardwareOutputSampleRate(PP_Instance instance) {
+ uint32_t result = PP_AUDIOSAMPLERATE_NONE;
+ dispatcher()->Send(new PpapiHostMsg_PPBInstance_AudioHardwareOutputSampleRate(
brettw 2012/02/10 19:01:33 Can the messages and handlers be made to match the
nfullagar 2012/02/14 00:42:37 Changed to GetAudio... (as you suggested in a late
+ API_ID_PPB_INSTANCE, instance, &result));
+ return result;
+}
+
+uint32_t PPB_Instance_Proxy::
+ AudioHardwareOutputBufferSize(PP_Instance instance) {
+ uint32_t result = 0;
+ dispatcher()->Send(new PpapiHostMsg_PPBInstance_AudioHardwareOutputBufferSize(
+ API_ID_PPB_INSTANCE, instance, &result));
+ return result;
+}
+
PP_Var PPB_Instance_Proxy::GetDefaultCharSet(PP_Instance instance) {
PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance);
if (!dispatcher)
@@ -404,6 +425,20 @@
}
}
+void PPB_Instance_Proxy::OnHostMsgAudioHardwareOutputSampleRate(
+ PP_Instance instance, uint32_t* result) {
+ EnterInstanceNoLock enter(instance, false);
+ if (enter.succeeded())
+ *result = enter.functions()->AudioHardwareOutputSampleRate(instance);
+}
+
+void PPB_Instance_Proxy::OnHostMsgAudioHardwareOutputBufferSize(
+ PP_Instance instance, uint32_t* result) {
+ EnterInstanceNoLock enter(instance, false);
+ if (enter.succeeded())
+ *result = enter.functions()->AudioHardwareOutputBufferSize(instance);
+}
+
void PPB_Instance_Proxy::OnHostMsgIsFullFrame(PP_Instance instance,
PP_Bool* result) {
EnterInstanceNoLock enter(instance, false);

Powered by Google App Engine
This is Rietveld 408576698