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

Unified Diff: third_party/WebKit/Source/modules/mediastream/UserMediaRequest.cpp

Issue 1641653002: Adding counters for the types of Media Constraints. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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/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 d8419394bfd418f06d0fb8bf9f9269b6bd7ebdf6..431292761e54f521d3325d25187fbdbbbe38a5ab 100644
--- a/third_party/WebKit/Source/modules/mediastream/UserMediaRequest.cpp
+++ b/third_party/WebKit/Source/modules/mediastream/UserMediaRequest.cpp
@@ -48,7 +48,7 @@
namespace blink {
-static WebMediaConstraints parseOptions(const BooleanOrMediaTrackConstraintSet& options, MediaErrorState& errorState)
+static WebMediaConstraints parseOptions(ExecutionContext* context, const BooleanOrMediaTrackConstraintSet& options, MediaErrorState& errorState)
{
WebMediaConstraints constraints;
@@ -56,7 +56,7 @@ static WebMediaConstraints parseOptions(const BooleanOrMediaTrackConstraintSet&
if (options.isNull()) {
// Do nothing.
} else if (options.isMediaTrackConstraintSet()) {
- constraints = MediaConstraintsImpl::create(options.getAsMediaTrackConstraintSet(), errorState);
+ constraints = MediaConstraintsImpl::create(context, options.getAsMediaTrackConstraintSet(), errorState);
} else {
ASSERT(options.isBoolean());
if (options.getAsBoolean()) {
@@ -69,11 +69,11 @@ static WebMediaConstraints parseOptions(const BooleanOrMediaTrackConstraintSet&
UserMediaRequest* UserMediaRequest::create(ExecutionContext* context, UserMediaController* controller, const MediaStreamConstraints& options, NavigatorUserMediaSuccessCallback* successCallback, NavigatorUserMediaErrorCallback* errorCallback, MediaErrorState& errorState)
{
- WebMediaConstraints audio = parseOptions(options.audio(), errorState);
+ WebMediaConstraints audio = parseOptions(context, options.audio(), errorState);
if (errorState.hadException())
return nullptr;
- WebMediaConstraints video = parseOptions(options.video(), errorState);
+ WebMediaConstraints video = parseOptions(context, options.video(), errorState);
if (errorState.hadException())
return nullptr;
« no previous file with comments | « third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.idl ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698