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

Unified Diff: content/common/media/media_devices.cc

Issue 2609863004: Pass camera facing to WebKit (Closed)
Patch Set: use =default syntax 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: content/common/media/media_devices.cc
diff --git a/content/common/media/media_devices.cc b/content/common/media/media_devices.cc
index a18349b88136609038468d56e3c2b8fe064b35e5..82b92e39cf8ad96b848b1afac4cb7add5f75b8bd 100644
--- a/content/common/media/media_devices.cc
+++ b/content/common/media/media_devices.cc
@@ -4,9 +4,14 @@
#include "content/common/media/media_devices.h"
#include "media/audio/audio_device_description.h"
+#include "media/capture/video/video_capture_device_descriptor.h"
namespace content {
+MediaDeviceInfo::MediaDeviceInfo() = default;
+
+MediaDeviceInfo::~MediaDeviceInfo() = default;
+
MediaDeviceInfo::MediaDeviceInfo(const std::string& device_id,
const std::string& label,
const std::string& group_id)
@@ -18,6 +23,12 @@ MediaDeviceInfo::MediaDeviceInfo(
label(device_description.device_name),
group_id(device_description.group_id) {}
+MediaDeviceInfo::MediaDeviceInfo(
+ const media::VideoCaptureDeviceDescriptor& descriptor)
+ : device_id(descriptor.device_id),
+ label(descriptor.GetNameAndModel()),
+ model_id(descriptor.model_id) {}
+
bool operator==(const MediaDeviceInfo& first, const MediaDeviceInfo& second) {
return first.device_id == second.device_id && first.label == second.label;
}

Powered by Google App Engine
This is Rietveld 408576698