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

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

Issue 312773002: Support for audio output devices for getMediaDevices. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 6 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_dispatcher_host.cc
diff --git a/content/browser/renderer_host/media/media_stream_dispatcher_host.cc b/content/browser/renderer_host/media/media_stream_dispatcher_host.cc
index 78372bb57b898774451f06f8c8c5c480feea543e..36f6794ccead4771c475e406c7a645b8c194389d 100644
--- a/content/browser/renderer_host/media/media_stream_dispatcher_host.cc
+++ b/content/browser/renderer_host/media/media_stream_dispatcher_host.cc
@@ -181,10 +181,12 @@ void MediaStreamDispatcherHost::OnEnumerateDevices(
return;
DCHECK(type == MEDIA_DEVICE_AUDIO_CAPTURE ||
- type == MEDIA_DEVICE_VIDEO_CAPTURE);
- bool have_permission = type == MEDIA_DEVICE_AUDIO_CAPTURE ?
- resource_context_->AllowMicAccess(security_origin) :
- resource_context_->AllowCameraAccess(security_origin);
+ type == MEDIA_DEVICE_VIDEO_CAPTURE ||
+ type == MEDIA_DEVICE_AUDIO_OUTPUT);
+ bool have_permission =
+ type == MEDIA_DEVICE_AUDIO_CAPTURE || type == MEDIA_DEVICE_AUDIO_OUTPUT ?
+ resource_context_->AllowMicAccess(security_origin) :
+ resource_context_->AllowCameraAccess(security_origin);
media_stream_manager_->EnumerateDevices(
this, render_process_id_, render_view_id, salt_callback_,

Powered by Google App Engine
This is Rietveld 408576698