Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(338)

Side by Side Diff: Source/modules/mediastream/RTCDTMFSender.h

Issue 173363002: Move mediastream module to oilpan transition types (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 25 matching lines...) Expand all
36 namespace blink { 36 namespace blink {
37 class WebRTCDTMFSenderHandler; 37 class WebRTCDTMFSenderHandler;
38 class WebRTCPeerConnectionHandler; 38 class WebRTCPeerConnectionHandler;
39 } 39 }
40 40
41 namespace WebCore { 41 namespace WebCore {
42 42
43 class ExceptionState; 43 class ExceptionState;
44 class MediaStreamTrack; 44 class MediaStreamTrack;
45 45
46 class RTCDTMFSender FINAL : public RefCounted<RTCDTMFSender>, public ScriptWrapp able, public EventTargetWithInlineData, public blink::WebRTCDTMFSenderHandlerCli ent, public ActiveDOMObject { 46 class RTCDTMFSender FINAL : public RefCountedWillBeRefCountedGarbageCollected<RT CDTMFSender>, public ScriptWrappable, public EventTargetWithInlineData, public b link::WebRTCDTMFSenderHandlerClient, public ActiveDOMObject {
47 REFCOUNTED_EVENT_TARGET(RTCDTMFSender); 47 DEFINE_EVENT_TARGET_REFCOUNTING(RefCountedWillBeRefCountedGarbageCollected<R TCDTMFSender>);
48 public: 48 public:
49 static PassRefPtr<RTCDTMFSender> create(ExecutionContext*, blink::WebRTCPeer ConnectionHandler*, PassRefPtr<MediaStreamTrack>, ExceptionState&); 49 static PassRefPtrWillBeRawPtr<RTCDTMFSender> create(ExecutionContext*, blink ::WebRTCPeerConnectionHandler*, PassRefPtrWillBeRawPtr<MediaStreamTrack>, Except ionState&);
50 virtual ~RTCDTMFSender(); 50 virtual ~RTCDTMFSender();
51 51
52 bool canInsertDTMF() const; 52 bool canInsertDTMF() const;
53 MediaStreamTrack* track() const; 53 MediaStreamTrack* track() const;
54 String toneBuffer() const; 54 String toneBuffer() const;
55 long duration() const { return m_duration; } 55 long duration() const { return m_duration; }
56 long interToneGap() const { return m_interToneGap; } 56 long interToneGap() const { return m_interToneGap; }
57 57
58 void insertDTMF(const String& tones, ExceptionState&); 58 void insertDTMF(const String& tones, ExceptionState&);
59 void insertDTMF(const String& tones, long duration, ExceptionState&); 59 void insertDTMF(const String& tones, long duration, ExceptionState&);
60 void insertDTMF(const String& tones, long duration, long interToneGap, Excep tionState&); 60 void insertDTMF(const String& tones, long duration, long interToneGap, Excep tionState&);
61 61
62 DEFINE_ATTRIBUTE_EVENT_LISTENER(tonechange); 62 DEFINE_ATTRIBUTE_EVENT_LISTENER(tonechange);
63 63
64 // EventTarget 64 // EventTarget
65 virtual const AtomicString& interfaceName() const OVERRIDE; 65 virtual const AtomicString& interfaceName() const OVERRIDE;
66 virtual ExecutionContext* executionContext() const OVERRIDE; 66 virtual ExecutionContext* executionContext() const OVERRIDE;
67 67
68 // ActiveDOMObject 68 // ActiveDOMObject
69 virtual void stop() OVERRIDE; 69 virtual void stop() OVERRIDE;
70 70
71 void trace(Visitor*);
72
71 private: 73 private:
72 RTCDTMFSender(ExecutionContext*, PassRefPtr<MediaStreamTrack>, PassOwnPtr<bl ink::WebRTCDTMFSenderHandler>); 74 RTCDTMFSender(ExecutionContext*, PassRefPtrWillBeRawPtr<MediaStreamTrack>, P assOwnPtr<blink::WebRTCDTMFSenderHandler>);
73 75
74 void scheduleDispatchEvent(PassRefPtrWillBeRawPtr<Event>); 76 void scheduleDispatchEvent(PassRefPtrWillBeRawPtr<Event>);
75 void scheduledEventTimerFired(Timer<RTCDTMFSender>*); 77 void scheduledEventTimerFired(Timer<RTCDTMFSender>*);
76 78
77 // blink::WebRTCDTMFSenderHandlerClient 79 // blink::WebRTCDTMFSenderHandlerClient
78 virtual void didPlayTone(const blink::WebString&) OVERRIDE; 80 virtual void didPlayTone(const blink::WebString&) OVERRIDE;
79 81
80 RefPtr<MediaStreamTrack> m_track; 82 RefPtrWillBeMember<MediaStreamTrack> m_track;
81 long m_duration; 83 long m_duration;
82 long m_interToneGap; 84 long m_interToneGap;
83 85
84 OwnPtr<blink::WebRTCDTMFSenderHandler> m_handler; 86 OwnPtr<blink::WebRTCDTMFSenderHandler> m_handler;
85 87
86 bool m_stopped; 88 bool m_stopped;
87 89
88 Timer<RTCDTMFSender> m_scheduledEventTimer; 90 Timer<RTCDTMFSender> m_scheduledEventTimer;
89 WillBePersistentHeapVector<RefPtrWillBeMember<Event> > m_scheduledEvents; 91 WillBeHeapVector<RefPtrWillBeMember<Event> > m_scheduledEvents;
90 }; 92 };
91 93
92 } // namespace WebCore 94 } // namespace WebCore
93 95
94 #endif // RTCDTMFSender_h 96 #endif // RTCDTMFSender_h
OLDNEW
« no previous file with comments | « Source/modules/mediastream/NavigatorUserMediaError.idl ('k') | Source/modules/mediastream/RTCDTMFSender.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698