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 25 matching lines...) Expand all Loading... |
36 #include "wtf/RefPtr.h" | 36 #include "wtf/RefPtr.h" |
37 #include "wtf/Vector.h" | 37 #include "wtf/Vector.h" |
38 #include "wtf/text/WTFString.h" | 38 #include "wtf/text/WTFString.h" |
39 | 39 |
40 namespace WebCore { | 40 namespace WebCore { |
41 | 41 |
42 class ExceptionState; | 42 class ExceptionState; |
43 class MediaStreamComponent; | 43 class MediaStreamComponent; |
44 class MediaStreamTrackSourcesCallback; | 44 class MediaStreamTrackSourcesCallback; |
45 | 45 |
46 class MediaStreamTrack : public RefCounted<MediaStreamTrack>, public ScriptWrapp
able, public ActiveDOMObject, public EventTarget, public MediaStreamSource::Obse
rver { | 46 class MediaStreamTrack : public RefCounted<MediaStreamTrack>, public ScriptWrapp
able, public ActiveDOMObject, public EventTargetWithInlineData, public MediaStre
amSource::Observer { |
47 public: | 47 public: |
48 static PassRefPtr<MediaStreamTrack> create(ScriptExecutionContext*, MediaStr
eamComponent*); | 48 static PassRefPtr<MediaStreamTrack> create(ScriptExecutionContext*, MediaStr
eamComponent*); |
49 virtual ~MediaStreamTrack(); | 49 virtual ~MediaStreamTrack(); |
50 | 50 |
51 String kind() const; | 51 String kind() const; |
52 String id() const; | 52 String id() const; |
53 String label() const; | 53 String label() const; |
54 | 54 |
55 bool enabled() const; | 55 bool enabled() const; |
56 void setEnabled(bool); | 56 void setEnabled(bool); |
(...skipping 19 matching lines...) Expand all Loading... |
76 // ActiveDOMObject | 76 // ActiveDOMObject |
77 virtual void stop() OVERRIDE; | 77 virtual void stop() OVERRIDE; |
78 | 78 |
79 using RefCounted<MediaStreamTrack>::ref; | 79 using RefCounted<MediaStreamTrack>::ref; |
80 using RefCounted<MediaStreamTrack>::deref; | 80 using RefCounted<MediaStreamTrack>::deref; |
81 | 81 |
82 private: | 82 private: |
83 MediaStreamTrack(ScriptExecutionContext*, MediaStreamComponent*); | 83 MediaStreamTrack(ScriptExecutionContext*, MediaStreamComponent*); |
84 | 84 |
85 // EventTarget | 85 // EventTarget |
86 virtual EventTargetData* eventTargetData() OVERRIDE; | |
87 virtual EventTargetData* ensureEventTargetData() OVERRIDE; | |
88 virtual void refEventTarget() OVERRIDE { ref(); } | 86 virtual void refEventTarget() OVERRIDE { ref(); } |
89 virtual void derefEventTarget() OVERRIDE { deref(); } | 87 virtual void derefEventTarget() OVERRIDE { deref(); } |
90 EventTargetData m_eventTargetData; | |
91 | 88 |
92 // MediaStreamSourceObserver | 89 // MediaStreamSourceObserver |
93 virtual void sourceChangedState() OVERRIDE; | 90 virtual void sourceChangedState() OVERRIDE; |
94 | 91 |
95 bool m_stopped; | 92 bool m_stopped; |
96 RefPtr<MediaStreamComponent> m_component; | 93 RefPtr<MediaStreamComponent> m_component; |
97 }; | 94 }; |
98 | 95 |
99 typedef Vector<RefPtr<MediaStreamTrack> > MediaStreamTrackVector; | 96 typedef Vector<RefPtr<MediaStreamTrack> > MediaStreamTrackVector; |
100 | 97 |
101 } // namespace WebCore | 98 } // namespace WebCore |
102 | 99 |
103 #endif // MediaStreamTrack_h | 100 #endif // MediaStreamTrack_h |
OLD | NEW |