| 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 1078 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1089 { | 1089 { |
| 1090 DCHECK(!m_closed); | 1090 DCHECK(!m_closed); |
| 1091 DCHECK(getExecutionContext()->isContextThread()); | 1091 DCHECK(getExecutionContext()->isContextThread()); |
| 1092 | 1092 |
| 1093 if (m_signalingState == SignalingStateClosed) | 1093 if (m_signalingState == SignalingStateClosed) |
| 1094 return; | 1094 return; |
| 1095 | 1095 |
| 1096 MediaStream* stream = MediaStream::create(getExecutionContext(), remoteStrea
m); | 1096 MediaStream* stream = MediaStream::create(getExecutionContext(), remoteStrea
m); |
| 1097 m_remoteStreams.append(stream); | 1097 m_remoteStreams.append(stream); |
| 1098 | 1098 |
| 1099 scheduleDispatchEvent(MediaStreamEvent::create(EventTypeNames::addstream, fa
lse, false, stream)); | 1099 scheduleDispatchEvent(MediaStreamEvent::create(EventTypeNames::addstream, st
ream)); |
| 1100 } | 1100 } |
| 1101 | 1101 |
| 1102 void RTCPeerConnection::didRemoveRemoteStream(const WebMediaStream& remoteStream
) | 1102 void RTCPeerConnection::didRemoveRemoteStream(const WebMediaStream& remoteStream
) |
| 1103 { | 1103 { |
| 1104 DCHECK(!m_closed); | 1104 DCHECK(!m_closed); |
| 1105 DCHECK(getExecutionContext()->isContextThread()); | 1105 DCHECK(getExecutionContext()->isContextThread()); |
| 1106 | 1106 |
| 1107 MediaStreamDescriptor* streamDescriptor = remoteStream; | 1107 MediaStreamDescriptor* streamDescriptor = remoteStream; |
| 1108 DCHECK(streamDescriptor->client()); | 1108 DCHECK(streamDescriptor->client()); |
| 1109 | 1109 |
| 1110 MediaStream* stream = static_cast<MediaStream*>(streamDescriptor->client()); | 1110 MediaStream* stream = static_cast<MediaStream*>(streamDescriptor->client()); |
| 1111 stream->streamEnded(); | 1111 stream->streamEnded(); |
| 1112 | 1112 |
| 1113 if (m_signalingState == SignalingStateClosed) | 1113 if (m_signalingState == SignalingStateClosed) |
| 1114 return; | 1114 return; |
| 1115 | 1115 |
| 1116 size_t pos = m_remoteStreams.find(stream); | 1116 size_t pos = m_remoteStreams.find(stream); |
| 1117 DCHECK(pos != kNotFound); | 1117 DCHECK(pos != kNotFound); |
| 1118 m_remoteStreams.remove(pos); | 1118 m_remoteStreams.remove(pos); |
| 1119 | 1119 |
| 1120 scheduleDispatchEvent(MediaStreamEvent::create(EventTypeNames::removestream,
false, false, stream)); | 1120 scheduleDispatchEvent(MediaStreamEvent::create(EventTypeNames::removestream,
stream)); |
| 1121 } | 1121 } |
| 1122 | 1122 |
| 1123 void RTCPeerConnection::didAddRemoteDataChannel(WebRTCDataChannelHandler* handle
r) | 1123 void RTCPeerConnection::didAddRemoteDataChannel(WebRTCDataChannelHandler* handle
r) |
| 1124 { | 1124 { |
| 1125 DCHECK(!m_closed); | 1125 DCHECK(!m_closed); |
| 1126 DCHECK(getExecutionContext()->isContextThread()); | 1126 DCHECK(getExecutionContext()->isContextThread()); |
| 1127 | 1127 |
| 1128 if (m_signalingState == SignalingStateClosed) | 1128 if (m_signalingState == SignalingStateClosed) |
| 1129 return; | 1129 return; |
| 1130 | 1130 |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1279 { | 1279 { |
| 1280 visitor->trace(m_localStreams); | 1280 visitor->trace(m_localStreams); |
| 1281 visitor->trace(m_remoteStreams); | 1281 visitor->trace(m_remoteStreams); |
| 1282 visitor->trace(m_dispatchScheduledEventRunner); | 1282 visitor->trace(m_dispatchScheduledEventRunner); |
| 1283 visitor->trace(m_scheduledEvents); | 1283 visitor->trace(m_scheduledEvents); |
| 1284 EventTargetWithInlineData::trace(visitor); | 1284 EventTargetWithInlineData::trace(visitor); |
| 1285 ActiveDOMObject::trace(visitor); | 1285 ActiveDOMObject::trace(visitor); |
| 1286 } | 1286 } |
| 1287 | 1287 |
| 1288 } // namespace blink | 1288 } // namespace blink |
| OLD | NEW |