OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 WebRTCOfferOptions_h | 5 #ifndef WebRTCOfferOptions_h |
6 #define WebRTCOfferOptions_h | 6 #define WebRTCOfferOptions_h |
7 | 7 |
8 #include "WebCommon.h" | 8 #include "WebCommon.h" |
9 #include "WebNonCopyable.h" | 9 #include "WebNonCopyable.h" |
10 #include "WebPrivatePtr.h" | 10 #include "WebPrivatePtr.h" |
11 | 11 |
12 namespace blink { | 12 namespace blink { |
| 13 |
13 class RTCOfferOptions; | 14 class RTCOfferOptions; |
14 } | |
15 | |
16 namespace blink { | |
17 | 15 |
18 class WebRTCOfferOptions { | 16 class WebRTCOfferOptions { |
19 public: | 17 public: |
20 WebRTCOfferOptions() { } | 18 WebRTCOfferOptions() { } |
21 WebRTCOfferOptions(const WebRTCOfferOptions& other) { assign(other); } | 19 WebRTCOfferOptions(const WebRTCOfferOptions& other) { assign(other); } |
22 ~WebRTCOfferOptions() { reset(); } | 20 ~WebRTCOfferOptions() { reset(); } |
23 | 21 |
24 WebRTCOfferOptions& operator=(const WebRTCOfferOptions& other) | 22 WebRTCOfferOptions& operator=(const WebRTCOfferOptions& other) |
25 { | 23 { |
26 assign(other); | 24 assign(other); |
27 return *this; | 25 return *this; |
28 } | 26 } |
29 | 27 |
30 BLINK_PLATFORM_EXPORT void assign(const WebRTCOfferOptions&); | 28 BLINK_PLATFORM_EXPORT void assign(const WebRTCOfferOptions&); |
31 | 29 |
32 BLINK_PLATFORM_EXPORT void reset(); | 30 BLINK_PLATFORM_EXPORT void reset(); |
33 bool isNull() const { return m_private.isNull(); } | 31 bool isNull() const { return m_private.isNull(); } |
34 | 32 |
35 BLINK_PLATFORM_EXPORT int32_t offerToReceiveVideo() const; | 33 BLINK_PLATFORM_EXPORT int32_t offerToReceiveVideo() const; |
36 BLINK_PLATFORM_EXPORT int32_t offerToReceiveAudio() const; | 34 BLINK_PLATFORM_EXPORT int32_t offerToReceiveAudio() const; |
37 BLINK_PLATFORM_EXPORT bool voiceActivityDetection() const; | 35 BLINK_PLATFORM_EXPORT bool voiceActivityDetection() const; |
38 BLINK_PLATFORM_EXPORT bool iceRestart() const; | 36 BLINK_PLATFORM_EXPORT bool iceRestart() const; |
39 | 37 |
40 #if INSIDE_BLINK | 38 #if INSIDE_BLINK |
41 BLINK_PLATFORM_EXPORT WebRTCOfferOptions(const WTF::PassRefPtr<blink::RTCOff
erOptions>&); | 39 BLINK_PLATFORM_EXPORT WebRTCOfferOptions(const WTF::PassRefPtr<RTCOfferOptio
ns>&); |
42 #endif | 40 #endif |
43 | 41 |
44 private: | 42 private: |
45 WebPrivatePtr<blink::RTCOfferOptions> m_private; | 43 WebPrivatePtr<RTCOfferOptions> m_private; |
46 }; | 44 }; |
47 | 45 |
48 } // namespace blink | 46 } // namespace blink |
49 | 47 |
50 #endif // WebRTCOfferOptions_h | 48 #endif // WebRTCOfferOptions_h |
OLD | NEW |