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

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

Issue 2629383002: Add functionality to get default media device IDs from user preferences. (Closed)
Patch Set: address pkasting@'s comments 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
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/browser_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index ffcba101a4ca46844c2099124d03471d307fda4c..f136d01a35148a06a3a2101951b406bbb3688482 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -61,6 +61,7 @@
#include "chrome/browser/lifetime/keep_alive_registry.h"
#include "chrome/browser/lifetime/keep_alive_types.h"
#include "chrome/browser/lifetime/scoped_keep_alive.h"
+#include "chrome/browser/media/webrtc/media_capture_devices_dispatcher.h"
#include "chrome/browser/memory/tab_manager_web_contents_data.h"
#include "chrome/browser/notifications/notification_ui_manager.h"
#include "chrome/browser/pepper_broker_infobar_delegate.h"
@@ -1829,6 +1830,14 @@ bool Browser::CheckMediaAccessPermission(content::WebContents* web_contents,
return ::CheckMediaAccessPermission(web_contents, security_origin, type);
}
+std::string Browser::GetDefaultMediaDeviceID(content::WebContents* web_contents,
+ content::MediaStreamType type) {
+ Profile* profile =
+ Profile::FromBrowserContext(web_contents->GetBrowserContext());
+ return MediaCaptureDevicesDispatcher::GetInstance()
+ ->GetDefaultDeviceIDForProfile(profile, type);
+}
+
bool Browser::RequestPpapiBrokerPermission(
WebContents* web_contents,
const GURL& url,
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/browser_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698