Index: content/renderer/media/rtc_media_constraints.h |
diff --git a/content/renderer/media/rtc_media_constraints.h b/content/renderer/media/rtc_media_constraints.h |
index c39790e486b73f7a2b35686095dcdc4b38667a17..58f84864f221883426c8ca57b6408e4486a7448d 100644 |
--- a/content/renderer/media/rtc_media_constraints.h |
+++ b/content/renderer/media/rtc_media_constraints.h |
@@ -6,6 +6,7 @@ |
#define CONTENT_RENDERER_MEDIA_RTC_MEDIA_CONSTRAINTS_H_ |
#include "base/compiler_specific.h" |
+#include "content/common/content_export.h" |
#include "third_party/libjingle/source/talk/app/webrtc/mediaconstraintsinterface.h" |
namespace WebKit { |
@@ -17,14 +18,21 @@ namespace content { |
// RTCMediaConstraints acts as a glue layer between WebKits MediaConstraints and |
// libjingle webrtc::MediaConstraintsInterface. |
// Constraints are used by PeerConnection and getUserMedia API calls. |
-class RTCMediaConstraints : public webrtc::MediaConstraintsInterface { |
+class CONTENT_EXPORT RTCMediaConstraints |
+ : public NON_EXPORTED_BASE(webrtc::MediaConstraintsInterface) { |
public: |
+ RTCMediaConstraints(); |
explicit RTCMediaConstraints( |
const WebKit::WebMediaConstraints& constraints); |
virtual ~RTCMediaConstraints(); |
virtual const Constraints& GetMandatory() const OVERRIDE; |
virtual const Constraints& GetOptional() const OVERRIDE; |
void AddOptional(const std::string& key, const std::string& value); |
+ // Adds a mandatory constraint, optionally overriding an existing one. |
+ // If the constraint is already set and |override_if_exists| is false, |
+ // the function will return false, otherwise true. |
+ bool AddMandatory(const std::string& key, const std::string& value, |
+ bool override_if_exists); |
protected: |
Constraints mandatory_; |