| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 DictionaryHelper::get(options, "voiceActivityDetection", voiceActivityDetect
ion); | 349 DictionaryHelper::get(options, "voiceActivityDetection", voiceActivityDetect
ion); |
| 350 DictionaryHelper::get(options, "iceRestart", iceRestart); | 350 DictionaryHelper::get(options, "iceRestart", iceRestart); |
| 351 | 351 |
| 352 RTCOfferOptionsPlatform* rtcOfferOptions = RTCOfferOptionsPlatform::create(o
fferToReceiveVideo, offerToReceiveAudio, voiceActivityDetection, iceRestart); | 352 RTCOfferOptionsPlatform* rtcOfferOptions = RTCOfferOptionsPlatform::create(o
fferToReceiveVideo, offerToReceiveAudio, voiceActivityDetection, iceRestart); |
| 353 return rtcOfferOptions; | 353 return rtcOfferOptions; |
| 354 } | 354 } |
| 355 | 355 |
| 356 } // namespace | 356 } // namespace |
| 357 | 357 |
| 358 RTCPeerConnection::EventWrapper::EventWrapper( | 358 RTCPeerConnection::EventWrapper::EventWrapper( |
| 359 PassRefPtrWillBeRawPtr<Event> event, | 359 RawPtr<Event> event, |
| 360 PassOwnPtr<BoolFunction> function) | 360 PassOwnPtr<BoolFunction> function) |
| 361 : m_event(event) | 361 : m_event(event) |
| 362 , m_setupFunction(function) | 362 , m_setupFunction(function) |
| 363 { | 363 { |
| 364 } | 364 } |
| 365 | 365 |
| 366 bool RTCPeerConnection::EventWrapper::setup() | 366 bool RTCPeerConnection::EventWrapper::setup() |
| 367 { | 367 { |
| 368 if (m_setupFunction) { | 368 if (m_setupFunction) { |
| 369 return (*m_setupFunction)(); | 369 return (*m_setupFunction)(); |
| (...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1124 { | 1124 { |
| 1125 ASSERT(m_signalingState != RTCPeerConnection::SignalingStateClosed); | 1125 ASSERT(m_signalingState != RTCPeerConnection::SignalingStateClosed); |
| 1126 m_peerHandler->stop(); | 1126 m_peerHandler->stop(); |
| 1127 m_closed = true; | 1127 m_closed = true; |
| 1128 | 1128 |
| 1129 changeIceConnectionState(ICEConnectionStateClosed); | 1129 changeIceConnectionState(ICEConnectionStateClosed); |
| 1130 changeIceGatheringState(ICEGatheringStateComplete); | 1130 changeIceGatheringState(ICEGatheringStateComplete); |
| 1131 changeSignalingState(SignalingStateClosed); | 1131 changeSignalingState(SignalingStateClosed); |
| 1132 } | 1132 } |
| 1133 | 1133 |
| 1134 void RTCPeerConnection::scheduleDispatchEvent(PassRefPtrWillBeRawPtr<Event> even
t) | 1134 void RTCPeerConnection::scheduleDispatchEvent(RawPtr<Event> event) |
| 1135 { | 1135 { |
| 1136 scheduleDispatchEvent(event, nullptr); | 1136 scheduleDispatchEvent(event, nullptr); |
| 1137 } | 1137 } |
| 1138 | 1138 |
| 1139 void RTCPeerConnection::scheduleDispatchEvent(PassRefPtrWillBeRawPtr<Event> even
t, | 1139 void RTCPeerConnection::scheduleDispatchEvent(RawPtr<Event> event, |
| 1140 PassOwnPtr<BoolFunction> setupFunction) | 1140 PassOwnPtr<BoolFunction> setupFunction) |
| 1141 { | 1141 { |
| 1142 m_scheduledEvents.append(new EventWrapper(event, setupFunction)); | 1142 m_scheduledEvents.append(new EventWrapper(event, setupFunction)); |
| 1143 | 1143 |
| 1144 m_dispatchScheduledEventRunner->runAsync(); | 1144 m_dispatchScheduledEventRunner->runAsync(); |
| 1145 } | 1145 } |
| 1146 | 1146 |
| 1147 void RTCPeerConnection::dispatchScheduledEvent() | 1147 void RTCPeerConnection::dispatchScheduledEvent() |
| 1148 { | 1148 { |
| 1149 if (m_stopped) | 1149 if (m_stopped) |
| (...skipping 16 matching lines...) Expand all Loading... |
| 1166 { | 1166 { |
| 1167 visitor->trace(m_localStreams); | 1167 visitor->trace(m_localStreams); |
| 1168 visitor->trace(m_remoteStreams); | 1168 visitor->trace(m_remoteStreams); |
| 1169 visitor->trace(m_dispatchScheduledEventRunner); | 1169 visitor->trace(m_dispatchScheduledEventRunner); |
| 1170 visitor->trace(m_scheduledEvents); | 1170 visitor->trace(m_scheduledEvents); |
| 1171 RefCountedGarbageCollectedEventTargetWithInlineData<RTCPeerConnection>::trac
e(visitor); | 1171 RefCountedGarbageCollectedEventTargetWithInlineData<RTCPeerConnection>::trac
e(visitor); |
| 1172 ActiveDOMObject::trace(visitor); | 1172 ActiveDOMObject::trace(visitor); |
| 1173 } | 1173 } |
| 1174 | 1174 |
| 1175 } // namespace blink | 1175 } // namespace blink |
| OLD | NEW |