Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1552)

Unified Diff: webkit/plugins/ppapi/ppb_audio_input_impl.cc

Issue 10837064: Corresponding change in Pepper since EnumerateDevices contract is changed. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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,

Powered by Google App Engine
This is Rietveld 408576698