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

Unified Diff: content/renderer/media/mock_constraint_factory.cc

Issue 1617243005: Apply new-style constraints to video_source. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased 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
« no previous file with comments | « content/renderer/media/mock_constraint_factory.h ('k') | content/test/data/media/getusermedia.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/mock_constraint_factory.cc
diff --git a/content/renderer/media/mock_constraint_factory.cc b/content/renderer/media/mock_constraint_factory.cc
new file mode 100644
index 0000000000000000000000000000000000000000..4e2b4142d29d471c411a4a3288d3388f07b6453c
--- /dev/null
+++ b/content/renderer/media/mock_constraint_factory.cc
@@ -0,0 +1,32 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include <stddef.h>
+
+#include "base/macros.h"
+#include "base/strings/string_number_conversions.h"
+#include "base/strings/utf_string_conversions.h"
+#include "content/renderer/media/media_stream_audio_processor_options.h"
+#include "content/renderer/media/mock_constraint_factory.h"
+#include "third_party/libjingle/source/talk/app/webrtc/mediaconstraintsinterface.h"
+
+namespace content {
+
+MockConstraintFactory::MockConstraintFactory() {}
+
+MockConstraintFactory::~MockConstraintFactory() {}
+
+blink::WebMediaTrackConstraintSet& MockConstraintFactory::AddAdvanced() {
+ advanced_.emplace_back();
+ return advanced_.back();
+}
+
+blink::WebMediaConstraints MockConstraintFactory::CreateWebMediaConstraints()
+ const {
+ blink::WebMediaConstraints constraints;
+ constraints.initialize(basic_, advanced_);
+ return constraints;
+}
+
+} // namespace content
« no previous file with comments | « content/renderer/media/mock_constraint_factory.h ('k') | content/test/data/media/getusermedia.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698