| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_RENDERER_MEDIA_MOCK_CONSTRAINT_FACTORY_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_MOCK_CONSTRAINT_FACTORY_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_MOCK_CONSTRAINT_FACTORY_H_ | 6 #define CONTENT_RENDERER_MEDIA_MOCK_CONSTRAINT_FACTORY_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/macros.h" |
| 11 #include "third_party/WebKit/public/platform/WebMediaConstraints.h" | 12 #include "third_party/WebKit/public/platform/WebMediaConstraints.h" |
| 12 | 13 |
| 13 namespace content { | 14 namespace content { |
| 14 | 15 |
| 15 class MockConstraintFactory { | 16 class MockConstraintFactory { |
| 16 public: | 17 public: |
| 17 MockConstraintFactory(); | 18 MockConstraintFactory(); |
| 18 ~MockConstraintFactory(); | 19 ~MockConstraintFactory(); |
| 19 | 20 |
| 20 blink::WebMediaConstraints CreateWebMediaConstraints() const; | 21 blink::WebMediaConstraints CreateWebMediaConstraints() const; |
| 21 blink::WebMediaTrackConstraintSet& basic() { return basic_; } | 22 blink::WebMediaTrackConstraintSet& basic() { return basic_; } |
| 22 blink::WebMediaTrackConstraintSet& AddAdvanced(); | 23 blink::WebMediaTrackConstraintSet& AddAdvanced(); |
| 23 | 24 |
| 24 void DisableDefaultAudioConstraints(); | 25 void DisableDefaultAudioConstraints(); |
| 26 void Reset(); |
| 25 | 27 |
| 26 private: | 28 private: |
| 27 blink::WebMediaTrackConstraintSet basic_; | 29 blink::WebMediaTrackConstraintSet basic_; |
| 28 std::vector<blink::WebMediaTrackConstraintSet> advanced_; | 30 std::vector<blink::WebMediaTrackConstraintSet> advanced_; |
| 29 | 31 |
| 30 DISALLOW_COPY_AND_ASSIGN(MockConstraintFactory); | 32 DISALLOW_COPY_AND_ASSIGN(MockConstraintFactory); |
| 31 }; | 33 }; |
| 32 | 34 |
| 33 } // namespace content | 35 } // namespace content |
| 34 | 36 |
| 35 #endif // CONTENT_RENDERER_MEDIA_MOCK_CONSTRAINT_FACTORY_H_ | 37 #endif // CONTENT_RENDERER_MEDIA_MOCK_CONSTRAINT_FACTORY_H_ |
| OLD | NEW |