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

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

Issue 34393006: Refactor MediaStreamManager to never output real device id. It now always output sourceId in the fo… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix screen capture. Created 7 years, 2 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: 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..cd25204be648294af32c7f08a56c994d23d4c44d 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)) {
- devices_to_use.push_back(*it);
- accepted_audio = true;
+ IsAudioMediaType(it->type) &&
+ (request.requested_audio_device_id.empty() ||
+ request.requested_audio_device_id == it->id)) {
+ devices_to_use.push_back(*it);
tommi (sloooow) - chröme 2013/10/29 17:21:17 fix the indent
perkj_chrome 2013/10/30 08:59:29 sorry...
+ 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;
}

Powered by Google App Engine
This is Rietveld 408576698