Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 27 matching lines...) Expand all Loading... | |
| 38 #include "wtf/Vector.h" | 38 #include "wtf/Vector.h" |
| 39 #include "wtf/text/WTFString.h" | 39 #include "wtf/text/WTFString.h" |
| 40 | 40 |
| 41 namespace WebCore { | 41 namespace WebCore { |
| 42 | 42 |
| 43 class AudioSourceProvider; | 43 class AudioSourceProvider; |
| 44 class ExceptionState; | 44 class ExceptionState; |
| 45 class MediaStreamComponent; | 45 class MediaStreamComponent; |
| 46 class MediaStreamTrackSourcesCallback; | 46 class MediaStreamTrackSourcesCallback; |
| 47 | 47 |
| 48 class MediaStreamTrack FINAL : public RefCounted<MediaStreamTrack>, public Scrip tWrappable, public ActiveDOMObject, public EventTargetWithInlineData, public Med iaStreamSource::Observer { | 48 class MediaStreamTrack FINAL : public RefCountedWillBeRefCountedGarbageCollected <MediaStreamTrack>, public ScriptWrappable, public ActiveDOMObject, public Event TargetWithInlineData, public MediaStreamSource::Observer { |
| 49 REFCOUNTED_EVENT_TARGET(MediaStreamTrack); | 49 REFCOUNTED_EVENT_TARGET(MediaStreamTrack); |
| 50 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(MediaStreamTrack); | |
| 50 public: | 51 public: |
| 51 class Observer { | 52 class Observer { |
| 52 public: | 53 public: |
| 53 virtual ~Observer() { } | 54 virtual ~Observer() { } |
| 54 virtual void trackEnded() = 0; | 55 virtual void trackEnded() = 0; |
| 55 }; | 56 }; |
| 56 | 57 |
| 57 static PassRefPtr<MediaStreamTrack> create(ExecutionContext*, MediaStreamCom ponent*); | 58 static PassRefPtr<MediaStreamTrack> create(ExecutionContext*, MediaStreamCom ponent*); |
| 58 virtual ~MediaStreamTrack(); | 59 virtual ~MediaStreamTrack(); |
| 59 | 60 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 91 | 92 |
| 92 private: | 93 private: |
| 93 MediaStreamTrack(ExecutionContext*, MediaStreamComponent*); | 94 MediaStreamTrack(ExecutionContext*, MediaStreamComponent*); |
| 94 | 95 |
| 95 MediaStreamSource::ReadyState m_readyState; | 96 MediaStreamSource::ReadyState m_readyState; |
| 96 | 97 |
| 97 // MediaStreamSourceObserver | 98 // MediaStreamSourceObserver |
| 98 virtual void sourceChangedState() OVERRIDE; | 99 virtual void sourceChangedState() OVERRIDE; |
| 99 | 100 |
| 100 void propagateTrackEnded(); | 101 void propagateTrackEnded(); |
| 101 Vector<Observer*> m_observers; | 102 Vector<Observer*> m_observers; |
|
haraken
2014/05/27 01:39:19
Probably should we make this a HeapHashSet of a we
zerny-chromium
2014/05/27 07:34:33
I'll defer that to a follow-up CL.
haraken
2014/05/27 07:56:26
keishi@ just landed a CL that moves modules/medias
| |
| 102 bool m_isIteratingObservers; | 103 bool m_isIteratingObservers; |
| 103 | 104 |
| 104 bool m_stopped; | 105 bool m_stopped; |
| 105 RefPtr<MediaStreamComponent> m_component; | 106 RefPtr<MediaStreamComponent> m_component; |
| 106 }; | 107 }; |
| 107 | 108 |
| 108 typedef Vector<RefPtr<MediaStreamTrack> > MediaStreamTrackVector; | 109 typedef Vector<RefPtr<MediaStreamTrack> > MediaStreamTrackVector; |
| 109 | 110 |
| 110 } // namespace WebCore | 111 } // namespace WebCore |
| 111 | 112 |
| 112 #endif // MediaStreamTrack_h | 113 #endif // MediaStreamTrack_h |
| OLD | NEW |