| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 #include "bindings/v8/ScriptWrappable.h" | 29 #include "bindings/v8/ScriptWrappable.h" |
| 30 #include "core/dom/ActiveDOMObject.h" | 30 #include "core/dom/ActiveDOMObject.h" |
| 31 #include "core/dom/EventTarget.h" | 31 #include "core/dom/EventTarget.h" |
| 32 #include "core/platform/Timer.h" | 32 #include "core/platform/Timer.h" |
| 33 #include "core/platform/mediastream/RTCDTMFSenderHandlerClient.h" | 33 #include "core/platform/mediastream/RTCDTMFSenderHandlerClient.h" |
| 34 #include "wtf/RefCounted.h" | 34 #include "wtf/RefCounted.h" |
| 35 | 35 |
| 36 namespace WebCore { | 36 namespace WebCore { |
| 37 | 37 |
| 38 class ExceptionState; | |
| 39 class MediaStreamTrack; | 38 class MediaStreamTrack; |
| 39 class RTCPeerConnectionHandler; |
| 40 class RTCDTMFSenderHandler; | 40 class RTCDTMFSenderHandler; |
| 41 class RTCPeerConnectionHandler; | |
| 42 | 41 |
| 43 class RTCDTMFSender : public RefCounted<RTCDTMFSender>, public ScriptWrappable,
public EventTarget, public RTCDTMFSenderHandlerClient, public ActiveDOMObject { | 42 class RTCDTMFSender : public RefCounted<RTCDTMFSender>, public ScriptWrappable,
public EventTarget, public RTCDTMFSenderHandlerClient, public ActiveDOMObject { |
| 44 public: | 43 public: |
| 45 static PassRefPtr<RTCDTMFSender> create(ScriptExecutionContext*, RTCPeerConn
ectionHandler*, PassRefPtr<MediaStreamTrack>, ExceptionState&); | 44 static PassRefPtr<RTCDTMFSender> create(ScriptExecutionContext*, RTCPeerConn
ectionHandler*, PassRefPtr<MediaStreamTrack>, ExceptionCode&); |
| 46 ~RTCDTMFSender(); | 45 ~RTCDTMFSender(); |
| 47 | 46 |
| 48 bool canInsertDTMF() const; | 47 bool canInsertDTMF() const; |
| 49 MediaStreamTrack* track() const; | 48 MediaStreamTrack* track() const; |
| 50 String toneBuffer() const; | 49 String toneBuffer() const; |
| 51 long duration() const { return m_duration; } | 50 long duration() const { return m_duration; } |
| 52 long interToneGap() const { return m_interToneGap; } | 51 long interToneGap() const { return m_interToneGap; } |
| 53 | 52 |
| 54 void insertDTMF(const String& tones, ExceptionState&); | 53 void insertDTMF(const String& tones, ExceptionCode&); |
| 55 void insertDTMF(const String& tones, long duration, ExceptionState&); | 54 void insertDTMF(const String& tones, long duration, ExceptionCode&); |
| 56 void insertDTMF(const String& tones, long duration, long interToneGap, Excep
tionState&); | 55 void insertDTMF(const String& tones, long duration, long interToneGap, Excep
tionCode&); |
| 57 | 56 |
| 58 DEFINE_ATTRIBUTE_EVENT_LISTENER(tonechange); | 57 DEFINE_ATTRIBUTE_EVENT_LISTENER(tonechange); |
| 59 | 58 |
| 60 // EventTarget | 59 // EventTarget |
| 61 virtual const AtomicString& interfaceName() const OVERRIDE; | 60 virtual const AtomicString& interfaceName() const OVERRIDE; |
| 62 virtual ScriptExecutionContext* scriptExecutionContext() const OVERRIDE; | 61 virtual ScriptExecutionContext* scriptExecutionContext() const OVERRIDE; |
| 63 | 62 |
| 64 // ActiveDOMObject | 63 // ActiveDOMObject |
| 65 virtual void stop() OVERRIDE; | 64 virtual void stop() OVERRIDE; |
| 66 | 65 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 91 | 90 |
| 92 bool m_stopped; | 91 bool m_stopped; |
| 93 | 92 |
| 94 Timer<RTCDTMFSender> m_scheduledEventTimer; | 93 Timer<RTCDTMFSender> m_scheduledEventTimer; |
| 95 Vector<RefPtr<Event> > m_scheduledEvents; | 94 Vector<RefPtr<Event> > m_scheduledEvents; |
| 96 }; | 95 }; |
| 97 | 96 |
| 98 } // namespace WebCore | 97 } // namespace WebCore |
| 99 | 98 |
| 100 #endif // RTCDTMFSender_h | 99 #endif // RTCDTMFSender_h |
| OLD | NEW |