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..b62fbc0de78230b03dce924dfa78045e9460ff2a 100644 |
--- a/chrome/browser/media/webrtc/media_capture_devices_dispatcher.cc |
+++ b/chrome/browser/media/webrtc/media_capture_devices_dispatcher.cc |
@@ -234,6 +234,19 @@ 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) |
+ return prefs->GetString(prefs::kDefaultVideoCaptureDevice); |
+ else |
+ return std::string(); |
+} |
+ |
const content::MediaStreamDevice* |
MediaCaptureDevicesDispatcher::GetRequestedAudioDevice( |
const std::string& requested_audio_device_id) { |