| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_RTC_MEDIA_CONSTRAINTS_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_RTC_MEDIA_CONSTRAINTS_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_RTC_MEDIA_CONSTRAINTS_H_ | 6 #define CONTENT_RENDERER_MEDIA_RTC_MEDIA_CONSTRAINTS_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "third_party/libjingle/source/talk/app/webrtc/mediaconstraintsinterface
.h" | 9 #include "third_party/libjingle/source/talk/app/webrtc/mediaconstraintsinterface
.h" |
| 10 | 10 |
| 11 namespace WebKit { | 11 namespace WebKit { |
| 12 class WebMediaConstraints; | 12 class WebMediaConstraints; |
| 13 } | 13 } |
| 14 | 14 |
| 15 namespace content { | 15 namespace content { |
| 16 | 16 |
| 17 // RTCMediaConstraints acts as a glue layer between WebKits MediaConstraints and | 17 // RTCMediaConstraints acts as a glue layer between WebKits MediaConstraints and |
| 18 // libjingle webrtc::MediaConstraintsInterface. | 18 // libjingle webrtc::MediaConstraintsInterface. |
| 19 // Constraints are used by PeerConnection and getUserMedia API calls. | 19 // Constraints are used by PeerConnection and getUserMedia API calls. |
| 20 class RTCMediaConstraints : public webrtc::MediaConstraintsInterface { | 20 class RTCMediaConstraints : public webrtc::MediaConstraintsInterface { |
| 21 public: | 21 public: |
| 22 explicit RTCMediaConstraints( | 22 explicit RTCMediaConstraints( |
| 23 const WebKit::WebMediaConstraints& constraints); | 23 const WebKit::WebMediaConstraints& constraints); |
| 24 virtual ~RTCMediaConstraints(); | 24 virtual ~RTCMediaConstraints(); |
| 25 virtual const Constraints& GetMandatory() const OVERRIDE; | 25 virtual const Constraints& GetMandatory() const OVERRIDE; |
| 26 virtual const Constraints& GetOptional() const OVERRIDE; | 26 virtual const Constraints& GetOptional() const OVERRIDE; |
| 27 void AddOptional(const std::string& key, const std::string& value); |
| 27 | 28 |
| 28 protected: | 29 protected: |
| 29 Constraints mandatory_; | 30 Constraints mandatory_; |
| 30 Constraints optional_; | 31 Constraints optional_; |
| 31 }; | 32 }; |
| 32 | 33 |
| 33 } // namespace content | 34 } // namespace content |
| 34 | 35 |
| 35 | 36 |
| 36 #endif // CONTENT_RENDERER_MEDIA_RTC_MEDIA_CONSTRAINTS_H_ | 37 #endif // CONTENT_RENDERER_MEDIA_RTC_MEDIA_CONSTRAINTS_H_ |
| OLD | NEW |