| Index: third_party/WebKit/Source/platform/exported/WebMediaConstraints.cpp
|
| diff --git a/third_party/WebKit/Source/platform/exported/WebMediaConstraints.cpp b/third_party/WebKit/Source/platform/exported/WebMediaConstraints.cpp
|
| index 6e617b5cacea4c5faefae77ee227a3466dc349c1..96f5e381cd242f5a31153b9858c53cb992e41626 100644
|
| --- a/third_party/WebKit/Source/platform/exported/WebMediaConstraints.cpp
|
| +++ b/third_party/WebKit/Source/platform/exported/WebMediaConstraints.cpp
|
| @@ -42,6 +42,7 @@ public:
|
| static PassRefPtr<WebMediaConstraintsPrivate> create();
|
| static PassRefPtr<WebMediaConstraintsPrivate> create(const WebVector<WebMediaConstraint>& optional, const WebVector<WebMediaConstraint>& mandatory);
|
|
|
| + bool isEmpty() const;
|
| void getOptionalConstraints(WebVector<WebMediaConstraint>&);
|
| void getMandatoryConstraints(WebVector<WebMediaConstraint>&);
|
| bool getMandatoryConstraintValue(const WebString& name, WebString& value);
|
| @@ -72,6 +73,11 @@ WebMediaConstraintsPrivate::WebMediaConstraintsPrivate(const WebVector<WebMediaC
|
| {
|
| }
|
|
|
| +bool WebMediaConstraintsPrivate::isEmpty() const
|
| +{
|
| + return m_optional.isEmpty() && m_mandatory.isEmpty();
|
| +}
|
| +
|
| void WebMediaConstraintsPrivate::getOptionalConstraints(WebVector<WebMediaConstraint>& constraints)
|
| {
|
| constraints = m_optional;
|
| @@ -116,6 +122,11 @@ void WebMediaConstraints::reset()
|
| m_private.reset();
|
| }
|
|
|
| +bool WebMediaConstraints::isEmpty() const
|
| +{
|
| + return m_private.isNull() || m_private->isEmpty();
|
| +}
|
| +
|
| void WebMediaConstraints::getMandatoryConstraints(WebVector<WebMediaConstraint>& constraints) const
|
| {
|
| ASSERT(!isNull());
|
|
|