| 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 #include "public/platform/WebRTCOfferOptions.h" | 5 #include "public/platform/WebRTCOfferOptions.h" |
| 6 | 6 |
| 7 #include "platform/mediastream/RTCOfferOptionsPlatform.h" | 7 #include "platform/mediastream/RTCOfferOptionsPlatform.h" |
| 8 #include "wtf/Assertions.h" |
| 8 | 9 |
| 9 namespace blink { | 10 namespace blink { |
| 10 | 11 |
| 11 WebRTCOfferOptions::WebRTCOfferOptions(RTCOfferOptionsPlatform* options) | 12 WebRTCOfferOptions::WebRTCOfferOptions(RTCOfferOptionsPlatform* options) |
| 12 : m_private(options) | 13 : m_private(options) |
| 13 { | 14 { |
| 14 } | 15 } |
| 15 | 16 |
| 16 WebRTCOfferOptions::WebRTCOfferOptions(int32_t offerToReceiveAudio, | 17 WebRTCOfferOptions::WebRTCOfferOptions(int32_t offerToReceiveAudio, |
| 17 int32_t offerToReceiveVideo, bool voiceActivityDetection, | 18 int32_t offerToReceiveVideo, bool voiceActivityDetection, |
| 18 bool iceRestart) | 19 bool iceRestart) |
| 19 : m_private(RTCOfferOptionsPlatform::create(offerToReceiveAudio, offerToRece
iveVideo, voiceActivityDetection, iceRestart)) | 20 : m_private(RTCOfferOptionsPlatform::create(offerToReceiveAudio, offerToRece
iveVideo, voiceActivityDetection, iceRestart)) |
| 20 { | 21 { |
| 21 } | 22 } |
| 22 | 23 |
| 23 void WebRTCOfferOptions::assign(const WebRTCOfferOptions& other) | 24 void WebRTCOfferOptions::assign(const WebRTCOfferOptions& other) |
| 24 { | 25 { |
| 25 m_private = other.m_private; | 26 m_private = other.m_private; |
| 26 } | 27 } |
| 27 | 28 |
| 28 void WebRTCOfferOptions::reset() | 29 void WebRTCOfferOptions::reset() |
| 29 { | 30 { |
| 30 m_private.reset(); | 31 m_private.reset(); |
| 31 } | 32 } |
| 32 | 33 |
| 33 int32_t WebRTCOfferOptions::offerToReceiveVideo() const | 34 int32_t WebRTCOfferOptions::offerToReceiveVideo() const |
| 34 { | 35 { |
| 35 ASSERT(!isNull()); | 36 DCHECK(!isNull()); |
| 36 return m_private->offerToReceiveVideo(); | 37 return m_private->offerToReceiveVideo(); |
| 37 } | 38 } |
| 38 | 39 |
| 39 int32_t WebRTCOfferOptions::offerToReceiveAudio() const | 40 int32_t WebRTCOfferOptions::offerToReceiveAudio() const |
| 40 { | 41 { |
| 41 ASSERT(!isNull()); | 42 DCHECK(!isNull()); |
| 42 return m_private->offerToReceiveAudio(); | 43 return m_private->offerToReceiveAudio(); |
| 43 } | 44 } |
| 44 | 45 |
| 45 bool WebRTCOfferOptions::voiceActivityDetection() const | 46 bool WebRTCOfferOptions::voiceActivityDetection() const |
| 46 { | 47 { |
| 47 ASSERT(!isNull()); | 48 DCHECK(!isNull()); |
| 48 return m_private->voiceActivityDetection(); | 49 return m_private->voiceActivityDetection(); |
| 49 } | 50 } |
| 50 | 51 |
| 51 bool WebRTCOfferOptions::iceRestart() const | 52 bool WebRTCOfferOptions::iceRestart() const |
| 52 { | 53 { |
| 53 ASSERT(!isNull()); | 54 DCHECK(!isNull()); |
| 54 return m_private->iceRestart(); | 55 return m_private->iceRestart(); |
| 55 } | 56 } |
| 56 | 57 |
| 57 } // namespace blink | 58 } // namespace blink |
| OLD | NEW |