Chromium Code Reviews| Index: third_party/WebKit/Source/modules/mediastream/UserMediaRequest.cpp |
| diff --git a/third_party/WebKit/Source/modules/mediastream/UserMediaRequest.cpp b/third_party/WebKit/Source/modules/mediastream/UserMediaRequest.cpp |
| index ba8e286b76ac60320740e2b7f3cfa30847e09f8e..5c730ee1b344de795e72c63fb51588a1c33e48e7 100644 |
| --- a/third_party/WebKit/Source/modules/mediastream/UserMediaRequest.cpp |
| +++ b/third_party/WebKit/Source/modules/mediastream/UserMediaRequest.cpp |
| @@ -43,20 +43,24 @@ |
| #include "modules/mediastream/MediaConstraintsImpl.h" |
| #include "modules/mediastream/MediaStream.h" |
| #include "modules/mediastream/MediaStreamConstraints.h" |
| +#include "modules/mediastream/MediaTrackConstraintSet.h" |
| #include "modules/mediastream/UserMediaController.h" |
| #include "platform/mediastream/MediaStreamCenter.h" |
| #include "platform/mediastream/MediaStreamDescriptor.h" |
| namespace blink { |
| -static WebMediaConstraints parseOptions(const BooleanOrDictionary& options, ExceptionState& exceptionState) |
| +static WebMediaConstraints parseOptions(const BooleanOrMediaTrackConstraintSet& options, ExceptionState& exceptionState) |
| { |
| WebMediaConstraints constraints; |
| Dictionary constraintsDictionary; |
| - if (options.isDictionary()) { |
| - constraints = MediaConstraintsImpl::create(options.getAsDictionary(), exceptionState); |
| + if (options.isNull()) { |
| + // Do nothing. |
|
Guido Urdaneta
2015/10/05 12:34:12
Is this possible?
Should there be a NOTREACHED her
hta - Chromium
2015/10/05 12:54:01
It is possible. When you call getUserMedia({video:
|
| + } else if (options.isMediaTrackConstraintSet()) { |
| + constraints = MediaConstraintsImpl::create(options.getAsMediaTrackConstraintSet(), exceptionState); |
| } else { |
| + ASSERT(options.isBoolean()); |
| if (options.getAsBoolean()) { |
| constraints = MediaConstraintsImpl::create(); |
| } |