| 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 11 matching lines...) Expand all  Loading... | 
| 22  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 22  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 
| 23  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 
| 24  */ | 24  */ | 
| 25 | 25 | 
| 26 #ifndef MediaStreamTrack_h | 26 #ifndef MediaStreamTrack_h | 
| 27 #define MediaStreamTrack_h | 27 #define MediaStreamTrack_h | 
| 28 | 28 | 
| 29 #include "bindings/v8/ScriptWrappable.h" | 29 #include "bindings/v8/ScriptWrappable.h" | 
| 30 #include "core/dom/ActiveDOMObject.h" | 30 #include "core/dom/ActiveDOMObject.h" | 
| 31 #include "core/dom/EventTarget.h" | 31 #include "core/dom/EventTarget.h" | 
|  | 32 #include "core/dom/ExceptionBase.h" | 
| 32 #include "core/platform/mediastream/MediaStreamDescriptor.h" | 33 #include "core/platform/mediastream/MediaStreamDescriptor.h" | 
| 33 #include "core/platform/mediastream/MediaStreamSource.h" | 34 #include "core/platform/mediastream/MediaStreamSource.h" | 
|  | 35 #include "modules/mediastream/SourceInfo.h" | 
| 34 #include "wtf/RefCounted.h" | 36 #include "wtf/RefCounted.h" | 
| 35 #include "wtf/RefPtr.h" | 37 #include "wtf/RefPtr.h" | 
| 36 #include "wtf/Vector.h" | 38 #include "wtf/Vector.h" | 
| 37 #include "wtf/text/WTFString.h" | 39 #include "wtf/text/WTFString.h" | 
| 38 | 40 | 
| 39 namespace WebCore { | 41 namespace WebCore { | 
| 40 | 42 | 
| 41 class MediaStreamComponent; | 43 class MediaStreamComponent; | 
| 42 | 44 | 
| 43 class MediaStreamTrack : public RefCounted<MediaStreamTrack>, public ScriptWrapp
     able, public ActiveDOMObject, public EventTarget, public MediaStreamSource::Obse
     rver { | 45 class MediaStreamTrack : public RefCounted<MediaStreamTrack>, public ScriptWrapp
     able, public ActiveDOMObject, public EventTarget, public MediaStreamSource::Obse
     rver { | 
| 44 public: | 46 public: | 
| 45     static PassRefPtr<MediaStreamTrack> create(ScriptExecutionContext*, MediaStr
     eamComponent*); | 47     static PassRefPtr<MediaStreamTrack> create(ScriptExecutionContext*, MediaStr
     eamComponent*); | 
| 46     virtual ~MediaStreamTrack(); | 48     virtual ~MediaStreamTrack(); | 
| 47 | 49 | 
| 48     String kind() const; | 50     String kind() const; | 
| 49     String id() const; | 51     String id() const; | 
| 50     String label() const; | 52     String label() const; | 
| 51 | 53 | 
| 52     bool enabled() const; | 54     bool enabled() const; | 
| 53     void setEnabled(bool); | 55     void setEnabled(bool); | 
| 54 | 56 | 
| 55     void didEndTrack(); | 57     void didEndTrack(); | 
| 56 | 58 | 
| 57     String readyState() const; | 59     String readyState() const; | 
| 58 | 60 | 
|  | 61     static SourceInfoVector getSourceInfos(ScriptExecutionContext*, ExceptionCod
     e&); | 
|  | 62 | 
| 59     DEFINE_ATTRIBUTE_EVENT_LISTENER(mute); | 63     DEFINE_ATTRIBUTE_EVENT_LISTENER(mute); | 
| 60     DEFINE_ATTRIBUTE_EVENT_LISTENER(unmute); | 64     DEFINE_ATTRIBUTE_EVENT_LISTENER(unmute); | 
| 61     DEFINE_ATTRIBUTE_EVENT_LISTENER(ended); | 65     DEFINE_ATTRIBUTE_EVENT_LISTENER(ended); | 
| 62 | 66 | 
| 63     MediaStreamComponent* component(); | 67     MediaStreamComponent* component(); | 
| 64     bool ended() const; | 68     bool ended() const; | 
| 65 | 69 | 
| 66     // EventTarget | 70     // EventTarget | 
| 67     virtual const AtomicString& interfaceName() const OVERRIDE; | 71     virtual const AtomicString& interfaceName() const OVERRIDE; | 
| 68     virtual ScriptExecutionContext* scriptExecutionContext() const OVERRIDE; | 72     virtual ScriptExecutionContext* scriptExecutionContext() const OVERRIDE; | 
| (...skipping 19 matching lines...) Expand all  Loading... | 
| 88 | 92 | 
| 89     bool m_stopped; | 93     bool m_stopped; | 
| 90     RefPtr<MediaStreamComponent> m_component; | 94     RefPtr<MediaStreamComponent> m_component; | 
| 91 }; | 95 }; | 
| 92 | 96 | 
| 93 typedef Vector<RefPtr<MediaStreamTrack> > MediaStreamTrackVector; | 97 typedef Vector<RefPtr<MediaStreamTrack> > MediaStreamTrackVector; | 
| 94 | 98 | 
| 95 } // namespace WebCore | 99 } // namespace WebCore | 
| 96 | 100 | 
| 97 #endif // MediaStreamTrack_h | 101 #endif // MediaStreamTrack_h | 
| OLD | NEW | 
|---|