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

Unified Diff: third_party/WebKit/Source/platform/exported/WebMediaConstraints.cpp

Issue 1899943008: Macro-based constraints Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added a fourth macro application Created 4 years, 8 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/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 cd180cd5fcdda495b2c701decdb7f2a324e6c69d..043eb6bbda10900dbe774082f8de21a6f3537920 100644
--- a/third_party/WebKit/Source/platform/exported/WebMediaConstraints.cpp
+++ b/third_party/WebKit/Source/platform/exported/WebMediaConstraints.cpp
@@ -370,19 +370,13 @@ WebString BooleanConstraint::toString() const
}
WebMediaTrackConstraintSet::WebMediaTrackConstraintSet()
- : width("width")
- , height("height")
- , aspectRatio("aspectRatio")
- , frameRate("frameRate")
- , facingMode("facingMode")
- , volume("volume")
- , sampleRate("sampleRate")
- , sampleSize("sampleSize")
- , echoCancellation("echoCancellation")
- , latency("latency")
- , channelCount("channelCount")
- , deviceId("deviceId")
- , groupId("groupId")
+ : dummy()
+#define CONSTRAINT_ITEM(lowercase, uppercase, datatype) \
+ , lowercase(#lowercase)
+
+ CONSTRAINT_LIST
+
+#undef CONSTRAINT_ITEM
, mediaStreamSource("mediaStreamSource")
, renderToAssociatedSink("chromeRenderToAssociatedSink")
, hotwordEnabled("hotwordEnabled")
@@ -428,9 +422,10 @@ WebMediaTrackConstraintSet::WebMediaTrackConstraintSet()
std::vector<const BaseConstraint*> WebMediaTrackConstraintSet::allConstraints() const
{
const BaseConstraint* temp[] = {
- &width, &height, &aspectRatio, &frameRate, &facingMode, &volume,
- &sampleRate, &sampleSize, &echoCancellation, &latency, &channelCount,
- &deviceId, &groupId, &mediaStreamSource, &renderToAssociatedSink,
+#define CONSTRAINT_ITEM(lowercase, uppercase, datatype) &lowercase,
+CONSTRAINT_LIST
+#undef CONSTRAINT_ITEM
+ &mediaStreamSource, &renderToAssociatedSink,
&hotwordEnabled, &googEchoCancellation,
&googExperimentalEchoCancellation, &googAutoGainControl,
&googExperimentalAutoGainControl, &googNoiseSuppression,

Powered by Google App Engine
This is Rietveld 408576698