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 WEBKIT_PLUGINS_PPAPI_PPB_AUDIO_INPUT_IMPL_H_ | 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_AUDIO_INPUT_IMPL_H_ |
6 #define WEBKIT_PLUGINS_PPAPI_PPB_AUDIO_INPUT_IMPL_H_ | 6 #define WEBKIT_PLUGINS_PPAPI_PPB_AUDIO_INPUT_IMPL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 virtual void StreamCreated(base::SharedMemoryHandle shared_memory_handle, | 48 virtual void StreamCreated(base::SharedMemoryHandle shared_memory_handle, |
49 size_t shared_memory_size, | 49 size_t shared_memory_size, |
50 base::SyncSocket::Handle socket) OVERRIDE; | 50 base::SyncSocket::Handle socket) OVERRIDE; |
51 virtual void StreamCreationFailed() OVERRIDE; | 51 virtual void StreamCreationFailed() OVERRIDE; |
52 | 52 |
53 private: | 53 private: |
54 // PPB_AudioInput_Shared implementation. | 54 // PPB_AudioInput_Shared implementation. |
55 virtual int32_t InternalEnumerateDevices( | 55 virtual int32_t InternalEnumerateDevices( |
56 PP_Resource* devices, | 56 PP_Resource* devices, |
57 scoped_refptr< ::ppapi::TrackedCallback> callback) OVERRIDE; | 57 scoped_refptr< ::ppapi::TrackedCallback> callback) OVERRIDE; |
| 58 virtual int32_t InternalStopEnumerateDevices(PP_Resource* devices) OVERRIDE; |
58 virtual int32_t InternalOpen( | 59 virtual int32_t InternalOpen( |
59 const std::string& device_id, | 60 const std::string& device_id, |
60 PP_AudioSampleRate sample_rate, | 61 PP_AudioSampleRate sample_rate, |
61 uint32_t sample_frame_count, | 62 uint32_t sample_frame_count, |
62 scoped_refptr< ::ppapi::TrackedCallback> callback) OVERRIDE; | 63 scoped_refptr< ::ppapi::TrackedCallback> callback) OVERRIDE; |
63 virtual PP_Bool InternalStartCapture() OVERRIDE; | 64 virtual PP_Bool InternalStartCapture() OVERRIDE; |
64 virtual PP_Bool InternalStopCapture() OVERRIDE; | 65 virtual PP_Bool InternalStopCapture() OVERRIDE; |
65 virtual void InternalClose() OVERRIDE; | 66 virtual void InternalClose() OVERRIDE; |
66 | 67 |
67 void EnumerateDevicesCallbackFunc(int request_id, | 68 void EnumerateDevicesCallbackFunc(int request_id, |
68 bool succeeded, | 69 bool succeeded, |
69 const DeviceRefDataVector& devices); | 70 const DeviceRefDataVector& devices); |
70 | 71 |
71 // PluginDelegate audio input object that we delegate audio IPC through. | 72 // PluginDelegate audio input object that we delegate audio IPC through. |
72 // We don't own this pointer but are responsible for calling Shutdown on it. | 73 // We don't own this pointer but are responsible for calling Shutdown on it. |
73 PluginDelegate::PlatformAudioInput* audio_input_; | 74 PluginDelegate::PlatformAudioInput* audio_input_; |
74 | 75 |
75 DeviceRefDataVector devices_data_; | 76 DeviceRefDataVector devices_data_; |
76 | 77 |
77 DISALLOW_COPY_AND_ASSIGN(PPB_AudioInput_Impl); | 78 DISALLOW_COPY_AND_ASSIGN(PPB_AudioInput_Impl); |
78 }; | 79 }; |
79 | 80 |
80 } // namespace ppapi | 81 } // namespace ppapi |
81 } // namespace webkit | 82 } // namespace webkit |
82 | 83 |
83 #endif // WEBKIT_PLUGINS_PPAPI_PPB_AUDIO_INPUT_IMPL_H_ | 84 #endif // WEBKIT_PLUGINS_PPAPI_PPB_AUDIO_INPUT_IMPL_H_ |
OLD | NEW |