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

Unified Diff: third_party/WebKit/public/platform/WebMediaConstraints.h

Issue 1617243005: Apply new-style constraints to video_source. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 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 | « third_party/WebKit/Source/platform/exported/WebMediaConstraints.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/public/platform/WebMediaConstraints.h
diff --git a/third_party/WebKit/public/platform/WebMediaConstraints.h b/third_party/WebKit/public/platform/WebMediaConstraints.h
index 9ad9fe70f286f534fe96ad3cb41c114a3435c43c..b0ef2b9657443c7b0b34afde0aec28736baf37ae 100644
--- a/third_party/WebKit/public/platform/WebMediaConstraints.h
+++ b/third_party/WebKit/public/platform/WebMediaConstraints.h
@@ -37,6 +37,8 @@
#include "WebString.h"
#include "WebVector.h"
+#include <vector>
+
namespace blink {
class WebMediaConstraintsPrivate;
@@ -46,7 +48,8 @@ public:
explicit BaseConstraint(const char* name);
virtual ~BaseConstraint();
virtual bool isEmpty() const = 0;
- const char* name()
+ virtual bool hasMandatory() const = 0;
+ const char* name() const
{
return m_name;
}
@@ -84,6 +87,11 @@ public:
bool matches(long value) const;
bool isEmpty() const override;
+ bool hasMandatory() const override;
+ bool hasMin() const { return m_hasMin; }
+ long min() const { return m_min; }
+ bool hasMax() const { return m_hasMax; }
+ long max() const { return m_max; }
private:
long m_min;
@@ -131,6 +139,11 @@ public:
bool matches(double value) const;
bool isEmpty() const override;
+ bool hasMandatory() const override;
+ bool hasMin() const { return m_hasMin; }
+ double min() const { return m_min; }
+ bool hasMax() const { return m_hasMax; }
+ double max() const { return m_max; }
private:
double m_min;
@@ -167,6 +180,7 @@ public:
bool matches(WebString value) const;
bool isEmpty() const override;
+ bool hasMandatory() const override;
const WebVector<WebString>& exact() const;
const WebVector<WebString>& ideal() const;
@@ -193,6 +207,7 @@ public:
bool matches(bool value) const;
bool isEmpty() const override;
+ bool hasMandatory() const override;
private:
unsigned m_ideal : 1;
@@ -260,6 +275,11 @@ public:
BooleanConstraint googPayloadPadding;
BLINK_PLATFORM_EXPORT bool isEmpty() const;
+ BLINK_PLATFORM_EXPORT bool hasMandatory() const;
+ BLINK_PLATFORM_EXPORT bool hasMandatoryOutsideSet(const std::vector<std::string>&, std::string&) const;
+
+private:
+ std::vector<const BaseConstraint*> allConstraints() const;
};
// Old type/value form of constraint. Will be deprecated.
« no previous file with comments | « third_party/WebKit/Source/platform/exported/WebMediaConstraints.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698