| Index: Source/platform/exported/WebMediaDeviceInfo.cpp
|
| diff --git a/Source/platform/exported/WebSourceInfo.cpp b/Source/platform/exported/WebMediaDeviceInfo.cpp
|
| similarity index 51%
|
| copy from Source/platform/exported/WebSourceInfo.cpp
|
| copy to Source/platform/exported/WebMediaDeviceInfo.cpp
|
| index d96a5f8693d17296bdfb2686efc8b00bbeb4e986..3737035cfa57184c1169edcbedd861bb164229df 100644
|
| --- a/Source/platform/exported/WebSourceInfo.cpp
|
| +++ b/Source/platform/exported/WebMediaDeviceInfo.cpp
|
| @@ -25,7 +25,7 @@
|
|
|
| #include "config.h"
|
|
|
| -#include "public/platform/WebSourceInfo.h"
|
| +#include "public/platform/WebMediaDeviceInfo.h"
|
|
|
| #include "public/platform/WebString.h"
|
| #include "wtf/PassRefPtr.h"
|
| @@ -33,74 +33,74 @@
|
|
|
| namespace blink {
|
|
|
| -class WebSourceInfoPrivate FINAL : public RefCounted<WebSourceInfoPrivate> {
|
| +class WebMediaDeviceInfoPrivate FINAL : public RefCounted<WebMediaDeviceInfoPrivate> {
|
| public:
|
| - static PassRefPtr<WebSourceInfoPrivate> create(const WebString& id, WebSourceInfo::SourceKind, const WebString& label, WebSourceInfo::VideoFacingMode);
|
| + static PassRefPtr<WebMediaDeviceInfoPrivate> create(const WebString& deviceId, WebMediaDeviceInfo::MediaDeviceKind, const WebString& label, const WebString& groupId);
|
|
|
| - const WebString& id() const { return m_id; }
|
| - WebSourceInfo::SourceKind kind() const { return m_kind; }
|
| + const WebString& deviceId() const { return m_deviceId; }
|
| + WebMediaDeviceInfo::MediaDeviceKind kind() const { return m_kind; }
|
| const WebString& label() const { return m_label; }
|
| - WebSourceInfo::VideoFacingMode facing() const { return m_facing; }
|
| + const WebString& groupId() const { return m_groupId; }
|
|
|
| private:
|
| - WebSourceInfoPrivate(const WebString& id, WebSourceInfo::SourceKind, const WebString& label, WebSourceInfo::VideoFacingMode);
|
| + WebMediaDeviceInfoPrivate(const WebString& deviceId, WebMediaDeviceInfo::MediaDeviceKind, const WebString& label, const WebString& groupId);
|
|
|
| - WebString m_id;
|
| - WebSourceInfo::SourceKind m_kind;
|
| + WebString m_deviceId;
|
| + WebMediaDeviceInfo::MediaDeviceKind m_kind;
|
| WebString m_label;
|
| - WebSourceInfo::VideoFacingMode m_facing;
|
| + WebString m_groupId;
|
| };
|
|
|
| -PassRefPtr<WebSourceInfoPrivate> WebSourceInfoPrivate::create(const WebString& id, WebSourceInfo::SourceKind kind, const WebString& label, WebSourceInfo::VideoFacingMode facing)
|
| +PassRefPtr<WebMediaDeviceInfoPrivate> WebMediaDeviceInfoPrivate::create(const WebString& deviceId, WebMediaDeviceInfo::MediaDeviceKind kind, const WebString& label, const WebString& groupId)
|
| {
|
| - return adoptRef(new WebSourceInfoPrivate(id, kind, label, facing));
|
| + return adoptRef(new WebMediaDeviceInfoPrivate(deviceId, kind, label, groupId));
|
| }
|
|
|
| -WebSourceInfoPrivate::WebSourceInfoPrivate(const WebString& id, WebSourceInfo::SourceKind kind, const WebString& label, WebSourceInfo::VideoFacingMode facing)
|
| - : m_id(id)
|
| +WebMediaDeviceInfoPrivate::WebMediaDeviceInfoPrivate(const WebString& deviceId, WebMediaDeviceInfo::MediaDeviceKind kind, const WebString& label, const WebString& groupId)
|
| + : m_deviceId(deviceId)
|
| , m_kind(kind)
|
| , m_label(label)
|
| - , m_facing(facing)
|
| + , m_groupId(groupId)
|
| {
|
| }
|
|
|
| -void WebSourceInfo::assign(const WebSourceInfo& other)
|
| +void WebMediaDeviceInfo::assign(const WebMediaDeviceInfo& other)
|
| {
|
| m_private = other.m_private;
|
| }
|
|
|
| -void WebSourceInfo::reset()
|
| +void WebMediaDeviceInfo::reset()
|
| {
|
| m_private.reset();
|
| }
|
|
|
| -void WebSourceInfo::initialize(const WebString& id, WebSourceInfo::SourceKind kind, const WebString& label, WebSourceInfo::VideoFacingMode facing)
|
| +void WebMediaDeviceInfo::initialize(const WebString& deviceId, WebMediaDeviceInfo::MediaDeviceKind kind, const WebString& label, const WebString& groupId)
|
| {
|
| - m_private = WebSourceInfoPrivate::create(id, kind, label, facing);
|
| + m_private = WebMediaDeviceInfoPrivate::create(deviceId, kind, label, groupId);
|
| }
|
|
|
| -WebString WebSourceInfo::id() const
|
| +WebString WebMediaDeviceInfo::deviceId() const
|
| {
|
| ASSERT(!m_private.isNull());
|
| - return m_private->id();
|
| + return m_private->deviceId();
|
| }
|
|
|
| -WebSourceInfo::SourceKind WebSourceInfo::kind() const
|
| +WebMediaDeviceInfo::MediaDeviceKind WebMediaDeviceInfo::kind() const
|
| {
|
| ASSERT(!m_private.isNull());
|
| return m_private->kind();
|
| }
|
|
|
| -WebString WebSourceInfo::label() const
|
| +WebString WebMediaDeviceInfo::label() const
|
| {
|
| ASSERT(!m_private.isNull());
|
| return m_private->label();
|
| }
|
|
|
| -WebSourceInfo::VideoFacingMode WebSourceInfo::facing() const
|
| +WebString WebMediaDeviceInfo::groupId() const
|
| {
|
| ASSERT(!m_private.isNull());
|
| - return m_private->facing();
|
| + return m_private->groupId();
|
| }
|
|
|
| } // namespace blink
|
|
|