| 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 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 } | 411 } |
| 412 | 412 |
| 413 if (!prpStream) { | 413 if (!prpStream) { |
| 414 es.throwDOMException(TypeMismatchError); | 414 es.throwDOMException(TypeMismatchError); |
| 415 return; | 415 return; |
| 416 } | 416 } |
| 417 | 417 |
| 418 RefPtr<MediaStream> stream = prpStream; | 418 RefPtr<MediaStream> stream = prpStream; |
| 419 | 419 |
| 420 size_t pos = m_localStreams.find(stream); | 420 size_t pos = m_localStreams.find(stream); |
| 421 if (pos == notFound) | 421 if (pos == kNotFound) |
| 422 return; | 422 return; |
| 423 | 423 |
| 424 m_localStreams.remove(pos); | 424 m_localStreams.remove(pos); |
| 425 | 425 |
| 426 m_peerHandler->removeStream(stream->descriptor()); | 426 m_peerHandler->removeStream(stream->descriptor()); |
| 427 } | 427 } |
| 428 | 428 |
| 429 MediaStreamVector RTCPeerConnection::getLocalStreams() const | 429 MediaStreamVector RTCPeerConnection::getLocalStreams() const |
| 430 { | 430 { |
| 431 return m_localStreams; | 431 return m_localStreams; |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 588 ASSERT(scriptExecutionContext()->isContextThread()); | 588 ASSERT(scriptExecutionContext()->isContextThread()); |
| 589 ASSERT(streamDescriptor->client()); | 589 ASSERT(streamDescriptor->client()); |
| 590 | 590 |
| 591 RefPtr<MediaStream> stream = static_cast<MediaStream*>(streamDescriptor->cli
ent()); | 591 RefPtr<MediaStream> stream = static_cast<MediaStream*>(streamDescriptor->cli
ent()); |
| 592 stream->streamEnded(); | 592 stream->streamEnded(); |
| 593 | 593 |
| 594 if (m_signalingState == SignalingStateClosed) | 594 if (m_signalingState == SignalingStateClosed) |
| 595 return; | 595 return; |
| 596 | 596 |
| 597 size_t pos = m_remoteStreams.find(stream); | 597 size_t pos = m_remoteStreams.find(stream); |
| 598 ASSERT(pos != notFound); | 598 ASSERT(pos != kNotFound); |
| 599 m_remoteStreams.remove(pos); | 599 m_remoteStreams.remove(pos); |
| 600 | 600 |
| 601 scheduleDispatchEvent(MediaStreamEvent::create(eventNames().removestreamEven
t, false, false, stream.release())); | 601 scheduleDispatchEvent(MediaStreamEvent::create(eventNames().removestreamEven
t, false, false, stream.release())); |
| 602 } | 602 } |
| 603 | 603 |
| 604 void RTCPeerConnection::didAddRemoteDataChannel(PassOwnPtr<RTCDataChannelHandler
> handler) | 604 void RTCPeerConnection::didAddRemoteDataChannel(PassOwnPtr<RTCDataChannelHandler
> handler) |
| 605 { | 605 { |
| 606 ASSERT(scriptExecutionContext()->isContextThread()); | 606 ASSERT(scriptExecutionContext()->isContextThread()); |
| 607 | 607 |
| 608 if (m_signalingState == SignalingStateClosed) | 608 if (m_signalingState == SignalingStateClosed) |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 686 events.swap(m_scheduledEvents); | 686 events.swap(m_scheduledEvents); |
| 687 | 687 |
| 688 Vector<RefPtr<Event> >::iterator it = events.begin(); | 688 Vector<RefPtr<Event> >::iterator it = events.begin(); |
| 689 for (; it != events.end(); ++it) | 689 for (; it != events.end(); ++it) |
| 690 dispatchEvent((*it).release()); | 690 dispatchEvent((*it).release()); |
| 691 | 691 |
| 692 events.clear(); | 692 events.clear(); |
| 693 } | 693 } |
| 694 | 694 |
| 695 } // namespace WebCore | 695 } // namespace WebCore |
| OLD | NEW |