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

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

Issue 170603003: Use nullptr_t for RefPtr, PassRefPtr and RawPtr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final rebase Created 6 years, 10 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 static const long maxToneDurationMs = 6000; 43 static const long maxToneDurationMs = 6000;
44 static const long minInterToneGapMs = 50; 44 static const long minInterToneGapMs = 50;
45 static const long defaultInterToneGapMs = 50; 45 static const long defaultInterToneGapMs = 50;
46 46
47 PassRefPtr<RTCDTMFSender> RTCDTMFSender::create(ExecutionContext* context, blink ::WebRTCPeerConnectionHandler* peerConnectionHandler, PassRefPtr<MediaStreamTrac k> prpTrack, ExceptionState& exceptionState) 47 PassRefPtr<RTCDTMFSender> RTCDTMFSender::create(ExecutionContext* context, blink ::WebRTCPeerConnectionHandler* peerConnectionHandler, PassRefPtr<MediaStreamTrac k> prpTrack, ExceptionState& exceptionState)
48 { 48 {
49 RefPtr<MediaStreamTrack> track = prpTrack; 49 RefPtr<MediaStreamTrack> track = prpTrack;
50 OwnPtr<blink::WebRTCDTMFSenderHandler> handler = adoptPtr(peerConnectionHand ler->createDTMFSender(track->component())); 50 OwnPtr<blink::WebRTCDTMFSenderHandler> handler = adoptPtr(peerConnectionHand ler->createDTMFSender(track->component()));
51 if (!handler) { 51 if (!handler) {
52 exceptionState.throwDOMException(NotSupportedError, "The MediaStreamTrac k provided is not an element of a MediaStream that's currently in the local stre ams set."); 52 exceptionState.throwDOMException(NotSupportedError, "The MediaStreamTrac k provided is not an element of a MediaStream that's currently in the local stre ams set.");
53 return 0; 53 return nullptr;
54 } 54 }
55 55
56 RefPtr<RTCDTMFSender> dtmfSender = adoptRef(new RTCDTMFSender(context, track , handler.release())); 56 RefPtr<RTCDTMFSender> dtmfSender = adoptRef(new RTCDTMFSender(context, track , handler.release()));
57 dtmfSender->suspendIfNeeded(); 57 dtmfSender->suspendIfNeeded();
58 return dtmfSender.release(); 58 return dtmfSender.release();
59 } 59 }
60 60
61 RTCDTMFSender::RTCDTMFSender(ExecutionContext* context, PassRefPtr<MediaStreamTr ack> track, PassOwnPtr<blink::WebRTCDTMFSenderHandler> handler) 61 RTCDTMFSender::RTCDTMFSender(ExecutionContext* context, PassRefPtr<MediaStreamTr ack> track, PassOwnPtr<blink::WebRTCDTMFSenderHandler> handler)
62 : ActiveDOMObject(context) 62 : ActiveDOMObject(context)
63 , m_track(track) 63 , m_track(track)
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 160
161 Vector<RefPtr<Event> > events; 161 Vector<RefPtr<Event> > events;
162 events.swap(m_scheduledEvents); 162 events.swap(m_scheduledEvents);
163 163
164 Vector<RefPtr<Event> >::iterator it = events.begin(); 164 Vector<RefPtr<Event> >::iterator it = events.begin();
165 for (; it != events.end(); ++it) 165 for (; it != events.end(); ++it)
166 dispatchEvent((*it).release()); 166 dispatchEvent((*it).release());
167 } 167 }
168 168
169 } // namespace WebCore 169 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/modules/mediastream/MediaStreamEvent.cpp ('k') | Source/modules/mediastream/RTCDataChannel.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698