| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef PPAPI_PROXY_PPB_AUDIO_CONFIG_PROXY_H_ | 5 #ifndef PPAPI_PROXY_PPB_AUDIO_CONFIG_PROXY_H_ |
| 6 #define PPAPI_PROXY_PPB_AUDIO_CONFIG_PROXY_H_ | 6 #define PPAPI_PROXY_PPB_AUDIO_CONFIG_PROXY_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "ppapi/c/pp_instance.h" | 9 #include "ppapi/c/pp_instance.h" |
| 10 #include "ppapi/c/pp_resource.h" | 10 #include "ppapi/c/pp_resource.h" |
| 11 #include "ppapi/proxy/interface_proxy.h" | 11 #include "ppapi/proxy/interface_proxy.h" |
| 12 | 12 |
| 13 struct PPB_AudioConfig; | 13 struct PPB_AudioConfig; |
| 14 | 14 |
| 15 namespace pp { | 15 namespace pp { |
| 16 namespace proxy { | 16 namespace proxy { |
| 17 | 17 |
| 18 class HostResource; | 18 class HostResource; |
| 19 | 19 |
| 20 class PPB_AudioConfig_Proxy : public InterfaceProxy { | 20 class PPB_AudioConfig_Proxy : public InterfaceProxy { |
| 21 public: | 21 public: |
| 22 PPB_AudioConfig_Proxy(Dispatcher* dispatcher, const void* target_interface); | 22 PPB_AudioConfig_Proxy(Dispatcher* dispatcher, const void* target_interface); |
| 23 virtual ~PPB_AudioConfig_Proxy(); | 23 virtual ~PPB_AudioConfig_Proxy(); |
| 24 | 24 |
| 25 static const Info* GetInfo(); |
| 26 |
| 25 const PPB_AudioConfig* ppb_audio_config_target() const { | 27 const PPB_AudioConfig* ppb_audio_config_target() const { |
| 26 return static_cast<const PPB_AudioConfig*>(target_interface()); | 28 return static_cast<const PPB_AudioConfig*>(target_interface()); |
| 27 } | 29 } |
| 28 | 30 |
| 29 // InterfaceProxy implementation. | 31 // InterfaceProxy implementation. |
| 30 virtual const void* GetSourceInterface() const; | |
| 31 virtual InterfaceID GetInterfaceId() const; | |
| 32 virtual bool OnMessageReceived(const IPC::Message& msg); | 32 virtual bool OnMessageReceived(const IPC::Message& msg); |
| 33 | 33 |
| 34 private: | 34 private: |
| 35 // Message handlers. | 35 // Message handlers. |
| 36 void OnMsgCreateStereo16Bit(PP_Instance instance, | 36 void OnMsgCreateStereo16Bit(PP_Instance instance, |
| 37 int32_t sample_rate, | 37 int32_t sample_rate, |
| 38 uint32_t sample_frame_count, | 38 uint32_t sample_frame_count, |
| 39 HostResource* result); | 39 HostResource* result); |
| 40 void OnMsgRecommendSampleFrameCount(int32_t sample_rate, | 40 void OnMsgRecommendSampleFrameCount(int32_t sample_rate, |
| 41 uint32_t requested, | 41 uint32_t requested, |
| 42 uint32_t* result); | 42 uint32_t* result); |
| 43 | 43 |
| 44 DISALLOW_COPY_AND_ASSIGN(PPB_AudioConfig_Proxy); | 44 DISALLOW_COPY_AND_ASSIGN(PPB_AudioConfig_Proxy); |
| 45 }; | 45 }; |
| 46 | 46 |
| 47 } // namespace proxy | 47 } // namespace proxy |
| 48 } // namespace pp | 48 } // namespace pp |
| 49 | 49 |
| 50 #endif // PPAPI_PROXY_PPB_AUDIO_CONFIG_PROXY_H_ | 50 #endif // PPAPI_PROXY_PPB_AUDIO_CONFIG_PROXY_H_ |
| OLD | NEW |