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

Unified Diff: chrome/browser/media/webrtc/media_capture_devices_dispatcher.h

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/media/webrtc/media_capture_devices_dispatcher.h
diff --git a/chrome/browser/media/webrtc/media_capture_devices_dispatcher.h b/chrome/browser/media/webrtc/media_capture_devices_dispatcher.h
index 2bd48511209467511055abc9d407558fb25f5afa..7668d4e7892e4326aad45462cdf279e521a19b63 100644
--- a/chrome/browser/media/webrtc/media_capture_devices_dispatcher.h
+++ b/chrome/browser/media/webrtc/media_capture_devices_dispatcher.h
@@ -9,6 +9,7 @@
#include <list>
#include <map>
#include <memory>
+#include <string>
#include "base/callback.h"
#include "base/macros.h"
@@ -109,6 +110,14 @@ class MediaCaptureDevicesDispatcher : public content::MediaObserver {
bool video,
content::MediaStreamDevices* devices);
+ // Helper to get default device IDs. If the returned value is an empty string,
+ // it means that there is no default device for the given device |type|. The
+ // only supported |type| values are content::MEDIA_DEVICE_AUDIO_CAPTURE and
+ // content::MEDIA_DEVICE_VIDEO_CAPTURE.
+ // Must be called on the UI thread.
+ std::string GetDefaultDeviceIdForProfile(Profile* profile,
+ content::MediaStreamType type);
+
// Helpers for picking particular requested devices, identified by raw id.
// If the device requested is not available it will return NULL.
const content::MediaStreamDevice*

Powered by Google App Engine
This is Rietveld 408576698