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

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

Issue 8883042: Added size check for MediaStreamDeviceSettings fake UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b1eb952657d4b539ece3761a36d8ab97f9be49d0..d2d0b4a297b46e141e543e271fc9314ce286e3b0 100644
--- a/content/browser/renderer_host/media/media_stream_device_settings.cc
+++ b/content/browser/renderer_host/media/media_stream_device_settings.cc
@@ -124,12 +124,12 @@ void MediaStreamDeviceSettings::AvailableDevices(
}
}
}
- if (num_media_requests != devices_to_use.size()) {
+ if (request->devices[kVideoCapture].size() > 0 &&
wjia(left Chromium) 2011/12/09 15:43:54 you can use if (!request->devices[kVideoCapture].
mflodman_chromium_OOO 2011/12/11 16:22:06 Done.
+ 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_NE(request->options.video_option, StreamOptions::kNoCamera);
StreamDeviceInfoArray device_array = (request->devices[kVideoCapture]);
devices_to_use.push_back(*(device_array.begin()));
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698