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 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
497 } | 497 } |
498 | 498 |
499 PassRefPtr<RTCDTMFSender> RTCPeerConnection::createDTMFSender(PassRefPtr<MediaSt
reamTrack> prpTrack, ExceptionState& exceptionState) | 499 PassRefPtr<RTCDTMFSender> RTCPeerConnection::createDTMFSender(PassRefPtr<MediaSt
reamTrack> prpTrack, ExceptionState& exceptionState) |
500 { | 500 { |
501 if (m_signalingState == SignalingStateClosed) { | 501 if (m_signalingState == SignalingStateClosed) { |
502 exceptionState.throwUninformativeAndGenericDOMException(InvalidStateErro
r); | 502 exceptionState.throwUninformativeAndGenericDOMException(InvalidStateErro
r); |
503 return 0; | 503 return 0; |
504 } | 504 } |
505 | 505 |
506 if (!prpTrack) { | 506 if (!prpTrack) { |
507 exceptionState.throwUninformativeAndGenericTypeError(); | 507 exceptionState.throwTypeError("The MediaStreamTrack provided is invalid.
"); |
508 return 0; | 508 return 0; |
509 } | 509 } |
510 | 510 |
511 RefPtr<MediaStreamTrack> track = prpTrack; | 511 RefPtr<MediaStreamTrack> track = prpTrack; |
512 | 512 |
513 if (!hasLocalStreamWithTrackId(track->id())) { | 513 if (!hasLocalStreamWithTrackId(track->id())) { |
514 exceptionState.throwUninformativeAndGenericDOMException(SyntaxError); | 514 exceptionState.throwUninformativeAndGenericDOMException(SyntaxError); |
515 return 0; | 515 return 0; |
516 } | 516 } |
517 | 517 |
(...skipping 168 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 |