| Index: ppapi/proxy/ppb_audio_input_proxy.cc
|
| diff --git a/ppapi/proxy/ppb_audio_input_proxy.cc b/ppapi/proxy/ppb_audio_input_proxy.cc
|
| index 32aa6b720a4b042b5e509e70837b9ec33b9d9ed4..fa967ebad2917590bdac41eb1235e0ff146bc398 100644
|
| --- a/ppapi/proxy/ppb_audio_input_proxy.cc
|
| +++ b/ppapi/proxy/ppb_audio_input_proxy.cc
|
| @@ -33,23 +33,21 @@ class AudioInput : public PPB_AudioInput_Shared {
|
| virtual ~AudioInput();
|
|
|
| // Implementation of PPB_AudioInput_API trusted methods.
|
| - virtual int32_t OpenTrusted(
|
| - const std::string& device_id,
|
| - PP_Resource config,
|
| - const PP_CompletionCallback& create_callback) OVERRIDE;
|
| + virtual int32_t OpenTrusted(const std::string& device_id,
|
| + PP_Resource config,
|
| + ApiCallbackType create_callback) OVERRIDE;
|
| virtual int32_t GetSyncSocket(int* sync_socket) OVERRIDE;
|
| virtual int32_t GetSharedMemory(int* shm_handle, uint32_t* shm_size) OVERRIDE;
|
| virtual const std::vector<DeviceRefData>& GetDeviceRefData() const OVERRIDE;
|
|
|
| private:
|
| // PPB_AudioInput_Shared implementation.
|
| - virtual int32_t InternalEnumerateDevices(
|
| - PP_Resource* devices,
|
| - PP_CompletionCallback callback) OVERRIDE;
|
| + virtual int32_t InternalEnumerateDevices(PP_Resource* devices,
|
| + ApiCallbackType callback) OVERRIDE;
|
| virtual int32_t InternalOpen(const std::string& device_id,
|
| PP_AudioSampleRate sample_rate,
|
| uint32_t sample_frame_count,
|
| - PP_CompletionCallback callback) OVERRIDE;
|
| + ApiCallbackType callback) OVERRIDE;
|
| virtual PP_Bool InternalStartCapture() OVERRIDE;
|
| virtual PP_Bool InternalStopCapture() OVERRIDE;
|
| virtual void InternalClose() OVERRIDE;
|
| @@ -71,7 +69,7 @@ AudioInput::~AudioInput() {
|
|
|
| int32_t AudioInput::OpenTrusted(const std::string& device_id,
|
| PP_Resource config,
|
| - const PP_CompletionCallback& create_callback) {
|
| + ApiCallbackType create_callback) {
|
| return PP_ERROR_NOTSUPPORTED; // Don't proxy the trusted interface.
|
| }
|
|
|
| @@ -90,9 +88,9 @@ const std::vector<DeviceRefData>& AudioInput::GetDeviceRefData() const {
|
| }
|
|
|
| int32_t AudioInput::InternalEnumerateDevices(PP_Resource* devices,
|
| - PP_CompletionCallback callback) {
|
| + ApiCallbackType callback) {
|
| devices_ = devices;
|
| - enumerate_devices_callback_ = new TrackedCallback(this, callback);
|
| + enumerate_devices_callback_ = callback;
|
| GetDispatcher()->Send(new PpapiHostMsg_PPBAudioInput_EnumerateDevices(
|
| API_ID_PPB_AUDIO_INPUT_DEV, host_resource()));
|
| return PP_OK_COMPLETIONPENDING;
|
| @@ -101,8 +99,8 @@ int32_t AudioInput::InternalEnumerateDevices(PP_Resource* devices,
|
| int32_t AudioInput::InternalOpen(const std::string& device_id,
|
| PP_AudioSampleRate sample_rate,
|
| uint32_t sample_frame_count,
|
| - PP_CompletionCallback callback) {
|
| - open_callback_ = new TrackedCallback(this, callback);
|
| + ApiCallbackType callback) {
|
| + open_callback_ = callback;
|
| GetDispatcher()->Send(new PpapiHostMsg_PPBAudioInput_Open(
|
| API_ID_PPB_AUDIO_INPUT_DEV, host_resource(), device_id, sample_rate,
|
| sample_frame_count));
|
| @@ -154,7 +152,7 @@ PP_Resource PPB_AudioInput_Proxy::CreateProxyResource0_1(
|
|
|
| AudioInput* audio_input = new AudioInput(result);
|
| int32_t open_result = audio_input->Open("", config, audio_input_callback,
|
| - user_data, AudioInput::MakeIgnoredCompletionCallback());
|
| + user_data, AudioInput::MakeIgnoredCompletionCallback(audio_input));
|
| if (open_result != PP_OK && open_result != PP_OK_COMPLETIONPENDING) {
|
| delete audio_input;
|
| return 0;
|
|
|