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

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

Issue 864533002: Fix template angle bracket syntax in modules (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 11 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * Copyright (C) 2011 Ericsson AB. All rights reserved. 3 * Copyright (C) 2011 Ericsson AB. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 dispatchEvent(Event::create(EventTypeNames::ended)); 193 dispatchEvent(Event::create(EventTypeNames::ended));
194 propagateTrackEnded(); 194 propagateTrackEnded();
195 break; 195 break;
196 } 196 }
197 } 197 }
198 198
199 void MediaStreamTrack::propagateTrackEnded() 199 void MediaStreamTrack::propagateTrackEnded()
200 { 200 {
201 RELEASE_ASSERT(!m_isIteratingRegisteredMediaStreams); 201 RELEASE_ASSERT(!m_isIteratingRegisteredMediaStreams);
202 m_isIteratingRegisteredMediaStreams = true; 202 m_isIteratingRegisteredMediaStreams = true;
203 for (HeapHashSet<Member<MediaStream> >::iterator iter = m_registeredMediaStr eams.begin(); iter != m_registeredMediaStreams.end(); ++iter) 203 for (HeapHashSet<Member<MediaStream>>::iterator iter = m_registeredMediaStre ams.begin(); iter != m_registeredMediaStreams.end(); ++iter)
204 (*iter)->trackEnded(); 204 (*iter)->trackEnded();
205 m_isIteratingRegisteredMediaStreams = false; 205 m_isIteratingRegisteredMediaStreams = false;
206 } 206 }
207 207
208 MediaStreamComponent* MediaStreamTrack::component() 208 MediaStreamComponent* MediaStreamTrack::component()
209 { 209 {
210 return m_component.get(); 210 return m_component.get();
211 } 211 }
212 212
213 void MediaStreamTrack::stop() 213 void MediaStreamTrack::stop()
214 { 214 {
215 m_stopped = true; 215 m_stopped = true;
216 } 216 }
217 217
218 PassOwnPtr<AudioSourceProvider> MediaStreamTrack::createWebAudioSource() 218 PassOwnPtr<AudioSourceProvider> MediaStreamTrack::createWebAudioSource()
219 { 219 {
220 return MediaStreamCenter::instance().createWebAudioSourceFromMediaStreamTrac k(component()); 220 return MediaStreamCenter::instance().createWebAudioSourceFromMediaStreamTrac k(component());
221 } 221 }
222 222
223 void MediaStreamTrack::registerMediaStream(MediaStream* mediaStream) 223 void MediaStreamTrack::registerMediaStream(MediaStream* mediaStream)
224 { 224 {
225 RELEASE_ASSERT(!m_isIteratingRegisteredMediaStreams); 225 RELEASE_ASSERT(!m_isIteratingRegisteredMediaStreams);
226 RELEASE_ASSERT(!m_registeredMediaStreams.contains(mediaStream)); 226 RELEASE_ASSERT(!m_registeredMediaStreams.contains(mediaStream));
227 m_registeredMediaStreams.add(mediaStream); 227 m_registeredMediaStreams.add(mediaStream);
228 } 228 }
229 229
230 void MediaStreamTrack::unregisterMediaStream(MediaStream* mediaStream) 230 void MediaStreamTrack::unregisterMediaStream(MediaStream* mediaStream)
231 { 231 {
232 RELEASE_ASSERT(!m_isIteratingRegisteredMediaStreams); 232 RELEASE_ASSERT(!m_isIteratingRegisteredMediaStreams);
233 HeapHashSet<Member<MediaStream> >::iterator iter = m_registeredMediaStreams. find(mediaStream); 233 HeapHashSet<Member<MediaStream>>::iterator iter = m_registeredMediaStreams.f ind(mediaStream);
234 RELEASE_ASSERT(iter != m_registeredMediaStreams.end()); 234 RELEASE_ASSERT(iter != m_registeredMediaStreams.end());
235 m_registeredMediaStreams.remove(iter); 235 m_registeredMediaStreams.remove(iter);
236 } 236 }
237 237
238 const AtomicString& MediaStreamTrack::interfaceName() const 238 const AtomicString& MediaStreamTrack::interfaceName() const
239 { 239 {
240 return EventTargetNames::MediaStreamTrack; 240 return EventTargetNames::MediaStreamTrack;
241 } 241 }
242 242
243 ExecutionContext* MediaStreamTrack::executionContext() const 243 ExecutionContext* MediaStreamTrack::executionContext() const
244 { 244 {
245 return ActiveDOMObject::executionContext(); 245 return ActiveDOMObject::executionContext();
246 } 246 }
247 247
248 void MediaStreamTrack::trace(Visitor* visitor) 248 void MediaStreamTrack::trace(Visitor* visitor)
249 { 249 {
250 visitor->trace(m_registeredMediaStreams); 250 visitor->trace(m_registeredMediaStreams);
251 RefCountedGarbageCollectedEventTargetWithInlineData<MediaStreamTrack>::trace (visitor); 251 RefCountedGarbageCollectedEventTargetWithInlineData<MediaStreamTrack>::trace (visitor);
252 ActiveDOMObject::trace(visitor); 252 ActiveDOMObject::trace(visitor);
253 } 253 }
254 254
255 } // namespace blink 255 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698