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

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

Issue 307433003: Oilpan: Allocate all EventTarget derived types on the manged heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 6 years, 6 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 26 matching lines...) Expand all
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 RefCountedWillBeRefCountedGarbageCollected<RT CDTMFSender>, public ScriptWrappable, public EventTargetWithInlineData, public b link::WebRTCDTMFSenderHandlerClient, public ActiveDOMObject { 46 class RTCDTMFSender FINAL : public RefCountedWillBeRefCountedGarbageCollected<RT CDTMFSender>, public ScriptWrappable, public EventTargetWithInlineData, public b link::WebRTCDTMFSenderHandlerClient, public ActiveDOMObject {
47 DEFINE_EVENT_TARGET_REFCOUNTING(RefCountedWillBeRefCountedGarbageCollected<R TCDTMFSender>); 47 REFCOUNTED_EVENT_TARGET(RTCDTMFSender);
48 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(RTCDTMFSender);
48 public: 49 public:
49 static PassRefPtrWillBeRawPtr<RTCDTMFSender> create(ExecutionContext*, blink ::WebRTCPeerConnectionHandler*, PassRefPtrWillBeRawPtr<MediaStreamTrack>, Except ionState&); 50 static PassRefPtrWillBeRawPtr<RTCDTMFSender> create(ExecutionContext*, blink ::WebRTCPeerConnectionHandler*, PassRefPtrWillBeRawPtr<MediaStreamTrack>, Except ionState&);
50 virtual ~RTCDTMFSender(); 51 virtual ~RTCDTMFSender();
51 52
52 bool canInsertDTMF() const; 53 bool canInsertDTMF() const;
53 MediaStreamTrack* track() const; 54 MediaStreamTrack* track() const;
54 String toneBuffer() const; 55 String toneBuffer() const;
55 long duration() const { return m_duration; } 56 long duration() const { return m_duration; }
56 long interToneGap() const { return m_interToneGap; } 57 long interToneGap() const { return m_interToneGap; }
57 58
58 void insertDTMF(const String& tones, ExceptionState&); 59 void insertDTMF(const String& tones, ExceptionState&);
59 void insertDTMF(const String& tones, long duration, ExceptionState&); 60 void insertDTMF(const String& tones, long duration, ExceptionState&);
60 void insertDTMF(const String& tones, long duration, long interToneGap, Excep tionState&); 61 void insertDTMF(const String& tones, long duration, long interToneGap, Excep tionState&);
61 62
62 DEFINE_ATTRIBUTE_EVENT_LISTENER(tonechange); 63 DEFINE_ATTRIBUTE_EVENT_LISTENER(tonechange);
63 64
64 // EventTarget 65 // EventTarget
65 virtual const AtomicString& interfaceName() const OVERRIDE; 66 virtual const AtomicString& interfaceName() const OVERRIDE;
66 virtual ExecutionContext* executionContext() const OVERRIDE; 67 virtual ExecutionContext* executionContext() const OVERRIDE;
67 68
68 // ActiveDOMObject 69 // ActiveDOMObject
69 virtual void stop() OVERRIDE; 70 virtual void stop() OVERRIDE;
70 71
71 void trace(Visitor*); 72 virtual void trace(Visitor*) OVERRIDE;
72 73
73 private: 74 private:
74 RTCDTMFSender(ExecutionContext*, PassRefPtrWillBeRawPtr<MediaStreamTrack>, P assOwnPtr<blink::WebRTCDTMFSenderHandler>); 75 RTCDTMFSender(ExecutionContext*, PassRefPtrWillBeRawPtr<MediaStreamTrack>, P assOwnPtr<blink::WebRTCDTMFSenderHandler>);
75 76
76 void scheduleDispatchEvent(PassRefPtrWillBeRawPtr<Event>); 77 void scheduleDispatchEvent(PassRefPtrWillBeRawPtr<Event>);
77 void scheduledEventTimerFired(Timer<RTCDTMFSender>*); 78 void scheduledEventTimerFired(Timer<RTCDTMFSender>*);
78 79
79 // blink::WebRTCDTMFSenderHandlerClient 80 // blink::WebRTCDTMFSenderHandlerClient
80 virtual void didPlayTone(const blink::WebString&) OVERRIDE; 81 virtual void didPlayTone(const blink::WebString&) OVERRIDE;
81 82
82 RefPtrWillBeMember<MediaStreamTrack> m_track; 83 RefPtrWillBeMember<MediaStreamTrack> m_track;
83 long m_duration; 84 long m_duration;
84 long m_interToneGap; 85 long m_interToneGap;
85 86
86 OwnPtr<blink::WebRTCDTMFSenderHandler> m_handler; 87 OwnPtr<blink::WebRTCDTMFSenderHandler> m_handler;
87 88
88 bool m_stopped; 89 bool m_stopped;
89 90
90 Timer<RTCDTMFSender> m_scheduledEventTimer; 91 Timer<RTCDTMFSender> m_scheduledEventTimer;
91 WillBeHeapVector<RefPtrWillBeMember<Event> > m_scheduledEvents; 92 WillBeHeapVector<RefPtrWillBeMember<Event> > m_scheduledEvents;
92 }; 93 };
93 94
94 } // namespace WebCore 95 } // namespace WebCore
95 96
96 #endif // RTCDTMFSender_h 97 #endif // RTCDTMFSender_h
OLDNEW
« no previous file with comments | « Source/modules/mediastream/MediaStreamTrack.cpp ('k') | Source/modules/mediastream/RTCDTMFSender.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698