Index: content/browser/renderer_host/media/media_stream_ui_proxy.cc |
diff --git a/content/browser/renderer_host/media/media_stream_ui_proxy.cc b/content/browser/renderer_host/media/media_stream_ui_proxy.cc |
index 3e4edbc0ac03b672d71c4aa2c91e06a997199cd6..b91ccb12095d293374e743d74f8bdfabb7c2f9f8 100644 |
--- a/content/browser/renderer_host/media/media_stream_ui_proxy.cc |
+++ b/content/browser/renderer_host/media/media_stream_ui_proxy.cc |
@@ -193,12 +193,16 @@ void FakeMediaStreamUIProxy::RequestAccess( |
it != devices_.end(); ++it) { |
if (!accepted_audio && |
IsAudioMediaType(request.audio_type) && |
- IsAudioMediaType(it->type)) { |
+ IsAudioMediaType(it->type) && |
+ (request.requested_audio_device_id.empty() || |
+ request.requested_audio_device_id == it->id)) { |
devices_to_use.push_back(*it); |
accepted_audio = true; |
} else if (!accepted_video && |
IsVideoMediaType(request.video_type) && |
- IsVideoMediaType(it->type)) { |
+ IsVideoMediaType(it->type) && |
+ (request.requested_video_device_id.empty() || |
+ request.requested_video_device_id == it->id)) { |
devices_to_use.push_back(*it); |
accepted_video = true; |
} |