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

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: Add <vector> include 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
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 49b6bd13d345950f430dc10e14348db4992a5411..b2f433976db6850e12c33e05521587ed9ceae972 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.

Powered by Google App Engine
This is Rietveld 408576698