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 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
516 return eventNames().interfaceForRTCPeerConnection; | 516 return eventNames().interfaceForRTCPeerConnection; |
517 } | 517 } |
518 | 518 |
519 ScriptExecutionContext* RTCPeerConnection::scriptExecutionContext() const | 519 ScriptExecutionContext* RTCPeerConnection::scriptExecutionContext() const |
520 { | 520 { |
521 return ActiveDOMObject::scriptExecutionContext(); | 521 return ActiveDOMObject::scriptExecutionContext(); |
522 } | 522 } |
523 | 523 |
524 void RTCPeerConnection::stop() | 524 void RTCPeerConnection::stop() |
525 { | 525 { |
526 if (m_readyState != ReadyStateClosed) | |
527 m_peerHandler->stop(); | |
528 | |
529 m_peerHandler.clear(); | |
530 | |
531 m_iceState = IceStateClosed; | 526 m_iceState = IceStateClosed; |
532 m_readyState = ReadyStateClosed; | 527 m_readyState = ReadyStateClosed; |
533 | 528 |
534 Vector<RefPtr<RTCDataChannel> >::iterator i = m_dataChannels.begin(); | 529 Vector<RefPtr<RTCDataChannel> >::iterator i = m_dataChannels.begin(); |
535 for (; i != m_dataChannels.end(); ++i) | 530 for (; i != m_dataChannels.end(); ++i) |
536 (*i)->stop(); | 531 (*i)->stop(); |
537 } | 532 } |
538 | 533 |
539 EventTargetData* RTCPeerConnection::eventTargetData() | 534 EventTargetData* RTCPeerConnection::eventTargetData() |
540 { | 535 { |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
595 Vector<RefPtr<Event> >::iterator it = events.begin(); | 590 Vector<RefPtr<Event> >::iterator it = events.begin(); |
596 for (; it != events.end(); ++it) | 591 for (; it != events.end(); ++it) |
597 dispatchEvent((*it).release()); | 592 dispatchEvent((*it).release()); |
598 | 593 |
599 events.clear(); | 594 events.clear(); |
600 } | 595 } |
601 | 596 |
602 } // namespace WebCore | 597 } // namespace WebCore |
603 | 598 |
604 #endif // ENABLE(MEDIA_STREAM) | 599 #endif // ENABLE(MEDIA_STREAM) |
OLD | NEW |