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

Unified Diff: content/browser/renderer_host/media/media_stream_device_settings.cc

Issue 8695004: Let fake UI allow a video capture device to be opened several times. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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: content/browser/renderer_host/media/media_stream_device_settings.cc
diff --git a/content/browser/renderer_host/media/media_stream_device_settings.cc b/content/browser/renderer_host/media/media_stream_device_settings.cc
index 85c634ed0d7d9489f5aaf7cacee8748f56ef7390..fb9b5d4f6b7dafa88941b917e0a6b9dfd07302e8 100644
--- a/content/browser/renderer_host/media/media_stream_device_settings.cc
+++ b/content/browser/renderer_host/media/media_stream_device_settings.cc
@@ -124,6 +124,16 @@ void MediaStreamDeviceSettings::AvailableDevices(
}
}
}
wjia(left Chromium) 2011/11/24 20:44:29 I was thinking of a simple way: remove the inner f
mflodman_chromium_OOO 2011/11/25 08:37:42 I thought about that too, but that would remove th
+ if (num_media_requests != devices_to_use.size()) {
+ // Not all requested device types were opened. This happens if all
+ // video capture devices are already opened, |in_use| isn't set for
+ // audio devices. Allow the first video capture device in the list to be
+ // opened for this user too.
+ DCHECK(request->options.video_option != StreamOptions::kNoCamera);
scherkus (not reviewing) 2011/11/29 02:39:53 DCHECK_NE
mflodman_chromium_OOO 2011/11/29 23:31:00 Done.
+ StreamDeviceInfoArray device_array = (request->devices[kVideoCapture]);
+ devices_to_use.push_back(*(device_array.begin()));
+ }
+
// Post result and delete request.
requester_->DevicesAccepted(label, devices_to_use);
requests_.erase(request_it);

Powered by Google App Engine
This is Rietveld 408576698