03e092cb831f6cba273d657639e125e49ad8478c
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / platform / mediastream / RTCOfferOptions.h
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef RTCOfferOptions_h
6 #define RTCOfferOptions_h
7
8 #include "platform/heap/Handle.h"
9
10 namespace blink {
11
12 class RTCOfferOptions final : public GarbageCollected<RTCOfferOptions> {
13 public:
14     static RTCOfferOptions* create(int32_t offerToReceiveVideo, int32_t offerToReceiveAudio, bool voiceActivityDetection, bool iceRestart)
15     {
16         return new RTCOfferOptions(offerToReceiveVideo, offerToReceiveAudio, voiceActivityDetection, iceRestart);
17     }
18
19     int32_t offerToReceiveVideo() const { return m_offerToReceiveVideo; }
20     int32_t offerToReceiveAudio() const { return m_offerToReceiveAudio; }
21     bool voiceActivityDetection() const { return m_voiceActivityDetection; }
22     bool iceRestart() const { return m_iceRestart; }
23
24     void trace(Visitor*) { }
25
26 private:
27     RTCOfferOptions(int32_t offerToReceiveVideo, int32_t offerToReceiveAudio, bool voiceActivityDetection, bool iceRestart)
28         : m_offerToReceiveVideo(offerToReceiveVideo)
29         , m_offerToReceiveAudio(offerToReceiveAudio)
30         , m_voiceActivityDetection(voiceActivityDetection)
31         , m_iceRestart(iceRestart)
32     {
33     }
34
35     int32_t m_offerToReceiveVideo;
36     int32_t m_offerToReceiveAudio;
37     bool m_voiceActivityDetection;
38     bool m_iceRestart;
39 };
40
41 } // namespace blink
42
43 #endif // RTCOfferOptions_h