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

Unified Diff: chrome/browser/ui/media_utils.cc

Issue 2629383002: Add functionality to get default media device IDs from user preferences. (Closed)
Patch Set: Created 3 years, 11 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: chrome/browser/ui/media_utils.cc
diff --git a/chrome/browser/ui/media_utils.cc b/chrome/browser/ui/media_utils.cc
index bae2e2e115274f532b04ae6b1d7959b847778e86..e5ffd493d8d6a9cdfd26c381bd7c0f4728986123 100644
--- a/chrome/browser/ui/media_utils.cc
+++ b/chrome/browser/ui/media_utils.cc
@@ -65,3 +65,11 @@ bool CheckMediaAccessPermission(content::WebContents* web_contents,
->CheckMediaAccessPermission(web_contents, security_origin, type);
#endif
}
+
+std::string GetDefaultMediaDeviceId(content::WebContents* web_contents,
+ content::MediaStreamType type) {
+ Profile* profile =
+ Profile::FromBrowserContext(web_contents->GetBrowserContext());
+ return MediaCaptureDevicesDispatcher::GetInstance()
+ ->GetDefaultDeviceIdForProfile(profile, type);
+}

Powered by Google App Engine
This is Rietveld 408576698