Index: webkit/plugins/ppapi/ppb_audio_input_impl.cc |
=================================================================== |
--- webkit/plugins/ppapi/ppb_audio_input_impl.cc (revision 148913) |
+++ webkit/plugins/ppapi/ppb_audio_input_impl.cc (working copy) |
@@ -111,13 +111,25 @@ |
devices_ = devices; |
enumerate_devices_callback_ = callback; |
- plugin_delegate->EnumerateDevices( |
+ enumeration_request_id_ = plugin_delegate->EnumerateDevices( |
PP_DEVICETYPE_DEV_AUDIOCAPTURE, |
base::Bind(&PPB_AudioInput_Impl::EnumerateDevicesCallbackFunc, |
AsWeakPtr())); |
return PP_OK_COMPLETIONPENDING; |
} |
+int32_t PPB_AudioInput_Impl::InternalStopEnumerateDevices( |
+ PP_Resource* devices) { |
+ PluginDelegate* plugin_delegate = ResourceHelper::GetPluginDelegate(this); |
+ if (!plugin_delegate) |
+ return PP_ERROR_FAILED; |
+ |
+ if (devices_ == devices) { |
+ plugin_delegate->StopEnumerateDevices(enumeration_request_id_); |
+ } |
+ return PP_OK; |
+} |
+ |
int32_t PPB_AudioInput_Impl::InternalOpen( |
const std::string& device_id, |
PP_AudioSampleRate sample_rate, |