| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_INPUT_PROXY_H_ | 5 #ifndef PPAPI_PROXY_PPB_AUDIO_INPUT_PROXY_H_ |
| 6 #define PPAPI_PROXY_PPB_AUDIO_INPUT_PROXY_H_ | 6 #define PPAPI_PROXY_PPB_AUDIO_INPUT_PROXY_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 // InterfaceProxy implementation. | 42 // InterfaceProxy implementation. |
| 43 virtual bool OnMessageReceived(const IPC::Message& msg); | 43 virtual bool OnMessageReceived(const IPC::Message& msg); |
| 44 | 44 |
| 45 static const ApiID kApiID = API_ID_PPB_AUDIO_INPUT_DEV; | 45 static const ApiID kApiID = API_ID_PPB_AUDIO_INPUT_DEV; |
| 46 | 46 |
| 47 private: | 47 private: |
| 48 // Message handlers. | 48 // Message handlers. |
| 49 // Plugin->renderer message handlers. | 49 // Plugin->renderer message handlers. |
| 50 void OnMsgCreate(PP_Instance instance, ppapi::HostResource* result); | 50 void OnMsgCreate(PP_Instance instance, ppapi::HostResource* result); |
| 51 void OnMsgEnumerateDevices(const ppapi::HostResource& audio_input); | 51 void OnMsgEnumerateDevices(const ppapi::HostResource& audio_input); |
| 52 void OnMsgStopEnumerateDevices(const ppapi::HostResource& audio_input); |
| 52 void OnMsgOpen(const ppapi::HostResource& audio_input, | 53 void OnMsgOpen(const ppapi::HostResource& audio_input, |
| 53 const std::string& device_id, | 54 const std::string& device_id, |
| 54 int32_t sample_rate, | 55 int32_t sample_rate, |
| 55 uint32_t sample_frame_count); | 56 uint32_t sample_frame_count); |
| 56 void OnMsgStartOrStop(const ppapi::HostResource& audio_input, bool capture); | 57 void OnMsgStartOrStop(const ppapi::HostResource& audio_input, bool capture); |
| 57 void OnMsgClose(const ppapi::HostResource& audio_input); | 58 void OnMsgClose(const ppapi::HostResource& audio_input); |
| 58 | 59 |
| 59 // Renderer->plugin message handlers. | 60 // Renderer->plugin message handlers. |
| 60 void OnMsgEnumerateDevicesACK( | 61 void OnMsgEnumerateDevicesACK( |
| 61 const ppapi::HostResource& audio_input, | 62 const ppapi::HostResource& audio_input, |
| (...skipping 25 matching lines...) Expand all Loading... |
| 87 | 88 |
| 88 ProxyCompletionCallbackFactory<PPB_AudioInput_Proxy> callback_factory_; | 89 ProxyCompletionCallbackFactory<PPB_AudioInput_Proxy> callback_factory_; |
| 89 | 90 |
| 90 DISALLOW_COPY_AND_ASSIGN(PPB_AudioInput_Proxy); | 91 DISALLOW_COPY_AND_ASSIGN(PPB_AudioInput_Proxy); |
| 91 }; | 92 }; |
| 92 | 93 |
| 93 } // namespace proxy | 94 } // namespace proxy |
| 94 } // namespace ppapi | 95 } // namespace ppapi |
| 95 | 96 |
| 96 #endif // PPAPI_PROXY_PPB_AUDIO_INPUT_PROXY_H_ | 97 #endif // PPAPI_PROXY_PPB_AUDIO_INPUT_PROXY_H_ |
| OLD | NEW |