Chromium Code Reviews| 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..c47263fecd3b116f656eb5e51f14d22bfdc86316 |
| --- /dev/null |
| +++ b/content/renderer/media/mock_constraint_factory.cc |
| @@ -0,0 +1,32 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
|
mcasas
2016/01/26 16:08:02
s/2014/2016/, but probably this file will merge in
hta - Chromium
2016/01/26 19:35:24
Done.
|
| +// 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::add_advanced() { |
| + advanced_.emplace_back(); |
| + return advanced_.back(); |
| +} |
| + |
| +blink::WebMediaConstraints MockConstraintFactory::CreateWebMediaConstraints() |
| + const { |
| + blink::WebMediaConstraints constraints; |
| + constraints.initialize(basic_, advanced_); |
| + return constraints; |
| +} |
| + |
| +} // namespace content |