Index: webkit/plugins/ppapi/ppb_video_capture_impl.cc |
=================================================================== |
--- webkit/plugins/ppapi/ppb_video_capture_impl.cc (revision 148913) |
+++ webkit/plugins/ppapi/ppb_video_capture_impl.cc (working copy) |
@@ -184,13 +184,25 @@ |
devices_ = devices; |
enumerate_devices_callback_ = callback; |
- instance->delegate()->EnumerateDevices( |
+ enumeration_request_id_ = instance->delegate()->EnumerateDevices( |
PP_DEVICETYPE_DEV_VIDEOCAPTURE, |
base::Bind(&PPB_VideoCapture_Impl::EnumerateDevicesCallbackFunc, |
AsWeakPtr())); |
return PP_OK_COMPLETIONPENDING; |
} |
+int32_t PPB_VideoCapture_Impl::InternalStopEnumerateDevices( |
+ PP_Resource* devices) { |
+ PluginInstance* instance = ResourceHelper::GetPluginInstance(this); |
+ if (!instance) |
+ return PP_ERROR_FAILED; |
+ |
+ if (devices_ == devices) { |
+ instance->delegate()->StopEnumerateDevices(enumeration_request_id_); |
+ } |
+ return PP_OK; |
+} |
+ |
int32_t PPB_VideoCapture_Impl::InternalOpen( |
const std::string& device_id, |
const PP_VideoCaptureDeviceInfo_Dev& requested_info, |