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, |