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

Unified Diff: Source/modules/mediastream/RTCDTMFSender.cpp

Issue 173363002: Move mediastream module to oilpan transition types (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: Source/modules/mediastream/RTCDTMFSender.cpp
diff --git a/Source/modules/mediastream/RTCDTMFSender.cpp b/Source/modules/mediastream/RTCDTMFSender.cpp
index 7759f1075e0eff6d9c2f32e185d279d132f0df5e..0faa9697b797594094a64e1f2f80ddde9592f75a 100644
--- a/Source/modules/mediastream/RTCDTMFSender.cpp
+++ b/Source/modules/mediastream/RTCDTMFSender.cpp
@@ -44,21 +44,21 @@ static const long maxToneDurationMs = 6000;
static const long minInterToneGapMs = 50;
static const long defaultInterToneGapMs = 50;
-PassRefPtr<RTCDTMFSender> RTCDTMFSender::create(ExecutionContext* context, blink::WebRTCPeerConnectionHandler* peerConnectionHandler, PassRefPtr<MediaStreamTrack> prpTrack, ExceptionState& exceptionState)
+PassRefPtrWillBeRawPtr<RTCDTMFSender> RTCDTMFSender::create(ExecutionContext* context, blink::WebRTCPeerConnectionHandler* peerConnectionHandler, PassRefPtrWillBeRawPtr<MediaStreamTrack> prpTrack, ExceptionState& exceptionState)
{
- RefPtr<MediaStreamTrack> track = prpTrack;
+ RefPtrWillBeRawPtr<MediaStreamTrack> track = prpTrack;
OwnPtr<blink::WebRTCDTMFSenderHandler> handler = adoptPtr(peerConnectionHandler->createDTMFSender(track->component()));
if (!handler) {
exceptionState.throwDOMException(NotSupportedError, "The MediaStreamTrack provided is not an element of a MediaStream that's currently in the local streams set.");
return nullptr;
}
- RefPtr<RTCDTMFSender> dtmfSender = adoptRef(new RTCDTMFSender(context, track, handler.release()));
+ RefPtrWillBeRawPtr<RTCDTMFSender> dtmfSender = adoptRefWillBeRefCountedGarbageCollected(new RTCDTMFSender(context, track, handler.release()));
dtmfSender->suspendIfNeeded();
return dtmfSender.release();
}
-RTCDTMFSender::RTCDTMFSender(ExecutionContext* context, PassRefPtr<MediaStreamTrack> track, PassOwnPtr<blink::WebRTCDTMFSenderHandler> handler)
+RTCDTMFSender::RTCDTMFSender(ExecutionContext* context, PassRefPtrWillBeRawPtr<MediaStreamTrack> track, PassOwnPtr<blink::WebRTCDTMFSenderHandler> handler)
: ActiveDOMObject(context)
, m_track(track)
, m_duration(defaultToneDurationMs)
@@ -166,4 +166,10 @@ void RTCDTMFSender::scheduledEventTimerFired(Timer<RTCDTMFSender>*)
dispatchEvent((*it).release());
}
+void RTCDTMFSender::trace(Visitor* visitor)
+{
+ visitor->trace(m_track);
+ visitor->trace(m_scheduledEvents);
+}
+
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698