OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef RTCTrackEvent_h |
| 6 #define RTCTrackEvent_h |
| 7 |
| 8 #include "modules/EventModules.h" |
| 9 #include "platform/heap/Member.h" |
| 10 #include "platform/heap/Visitor.h" |
| 11 #include "platform/wtf/text/AtomicString.h" |
| 12 |
| 13 namespace blink { |
| 14 |
| 15 class MediaStream; |
| 16 class MediaStreamTrack; |
| 17 class RTCRtpReceiver; |
| 18 class RTCTrackEventInit; |
| 19 |
| 20 // https://w3c.github.io/webrtc-pc/#rtctrackevent |
| 21 class RTCTrackEvent final : public Event { |
| 22 DEFINE_WRAPPERTYPEINFO(); |
| 23 |
| 24 public: |
| 25 static RTCTrackEvent* Create(const AtomicString& type, |
| 26 const RTCTrackEventInit& eventInitDict); |
| 27 RTCTrackEvent(RTCRtpReceiver*, |
| 28 MediaStreamTrack*, |
| 29 const HeapVector<Member<MediaStream>>&); |
| 30 |
| 31 RTCRtpReceiver* receiver() const; |
| 32 MediaStreamTrack* track() const; |
| 33 HeapVector<Member<MediaStream>> streams() const; |
| 34 |
| 35 DECLARE_VIRTUAL_TRACE(); |
| 36 |
| 37 private: |
| 38 RTCTrackEvent(const AtomicString& type, |
| 39 const RTCTrackEventInit& eventInitDict); |
| 40 |
| 41 Member<RTCRtpReceiver> receiver_; |
| 42 Member<MediaStreamTrack> track_; |
| 43 HeapVector<Member<MediaStream>> streams_; |
| 44 }; |
| 45 |
| 46 } // namespace blink |
| 47 |
| 48 #endif // RTCTrackEvent_h |
OLD | NEW |