Index: chrome/browser/media/webrtc/media_capture_devices_dispatcher.cc |
diff --git a/chrome/browser/media/webrtc/media_capture_devices_dispatcher.cc b/chrome/browser/media/webrtc/media_capture_devices_dispatcher.cc |
index cf79263665dea1aae09a4f38e57a0804611c5675..57d8883cebf26403fe03ede934d365f5471a3cfe 100644 |
--- a/chrome/browser/media/webrtc/media_capture_devices_dispatcher.cc |
+++ b/chrome/browser/media/webrtc/media_capture_devices_dispatcher.cc |
@@ -234,6 +234,18 @@ void MediaCaptureDevicesDispatcher::GetDefaultDevicesForProfile( |
} |
} |
+std::string MediaCaptureDevicesDispatcher::GetDefaultDeviceIdForProfile( |
+ Profile* profile, |
+ content::MediaStreamType type) { |
+ DCHECK_CURRENTLY_ON(BrowserThread::UI); |
+ PrefService* prefs = profile->GetPrefs(); |
+ if (type == content::MEDIA_DEVICE_AUDIO_CAPTURE) |
+ return prefs->GetString(prefs::kDefaultAudioCaptureDevice); |
+ else if (type == content::MEDIA_DEVICE_VIDEO_CAPTURE) |
Peter Kasting
2017/01/17 21:02:46
Drive-by nit: No else after return
Guido Urdaneta
2017/01/18 15:03:59
Done.
|
+ return prefs->GetString(prefs::kDefaultVideoCaptureDevice); |
+ return std::string(); |
+} |
+ |
const content::MediaStreamDevice* |
MediaCaptureDevicesDispatcher::GetRequestedAudioDevice( |
const std::string& requested_audio_device_id) { |