summaryrefslogtreecommitdiffstats
path: root/ppapi/proxy/ppb_audio_proxy.h
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-13 19:22:53 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-13 19:22:53 +0000
commit55cdf605cda8900f0c6c4d8098fb1ba951767fd2 (patch)
tree05f1d89fdf3f46d1cfd4350ee169ca9c282ae5e0 /ppapi/proxy/ppb_audio_proxy.h
parente1873b977ecb681d9261d9ce9fbe606e036b7d5b (diff)
downloadchromium_src-55cdf605cda8900f0c6c4d8098fb1ba951767fd2.zip
chromium_src-55cdf605cda8900f0c6c4d8098fb1ba951767fd2.tar.gz
chromium_src-55cdf605cda8900f0c6c4d8098fb1ba951767fd2.tar.bz2
Convert audio-related messages to the new thunk/API system for Pepper.
This has a bit of a change from the previous couple of resources that were converted in that the ResourceCreationProxy now calls a static proxy function for actually doing the work. It became too complicated and required that the ResourceCreationProxy know a lot about the internals of the objects. Did a little namespace cleanup. This renames "pp::shared_impl" to just use the "ppapi" namespace. The "shared_impl" was ugly and didn't help anything. Some files in that directory used "ppapi::shared_impl" instead which was even more confusing. Do a little build cleanup. The old ppapi_shared_proxy.gypi is now split into two sub-files, one for ppapi_shared, and one for ppapi_proxy. It's hopefully easier to find stuff now. Review URL: http://codereview.chromium.org/7014024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85303 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/proxy/ppb_audio_proxy.h')
-rw-r--r--ppapi/proxy/ppb_audio_proxy.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/ppapi/proxy/ppb_audio_proxy.h b/ppapi/proxy/ppb_audio_proxy.h
index 6574ef7..e39a82d 100644
--- a/ppapi/proxy/ppb_audio_proxy.h
+++ b/ppapi/proxy/ppb_audio_proxy.h
@@ -5,6 +5,8 @@
#ifndef PPAPI_PROXY_PPB_AUDIO_PROXY_H_
#define PPAPI_PROXY_PPB_AUDIO_PROXY_H_
+#include <utility>
+
#include "base/basictypes.h"
#include "base/shared_memory.h"
#include "base/sync_socket.h"
@@ -12,6 +14,8 @@
#include "ppapi/c/pp_instance.h"
#include "ppapi/c/pp_module.h"
#include "ppapi/c/pp_resource.h"
+#include "ppapi/c/ppb_audio.h"
+#include "ppapi/c/ppb_audio_config.h"
#include "ppapi/cpp/completion_callback.h"
#include "ppapi/proxy/interface_proxy.h"
#include "ppapi/proxy/proxy_non_thread_safe_ref_count.h"
@@ -30,6 +34,13 @@ class PPB_Audio_Proxy : public InterfaceProxy {
static const Info* GetInfo();
+ // Creates an Audio object in the plugin process.
+ static PP_Resource CreateProxyResource(PP_Instance instance_id,
+ PP_Resource config_id,
+ PPB_Audio_Callback audio_callback,
+ void* user_data);
+
+
const PPB_Audio* ppb_audio_target() const {
return static_cast<const PPB_Audio*>(target_interface());
}
@@ -40,7 +51,8 @@ class PPB_Audio_Proxy : public InterfaceProxy {
private:
// Plugin->renderer message handlers.
void OnMsgCreate(PP_Instance instance_id,
- const HostResource& config_id,
+ int32_t sample_rate,
+ uint32_t sample_frame_count,
HostResource* result);
void OnMsgStartOrStop(const HostResource& audio_id, bool play);