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 RTCRtpReceiver_h |
| 6 #define RTCRtpReceiver_h |
| 7 |
| 8 #include "bindings/core/v8/ScriptWrappable.h" |
| 9 #include "modules/mediastream/MediaStreamTrack.h" |
| 10 #include "platform/heap/GarbageCollected.h" |
| 11 #include "platform/heap/Member.h" |
| 12 #include "platform/heap/Visitor.h" |
| 13 #include "public/platform/WebRTCRtpReceiver.h" |
| 14 |
| 15 namespace blink { |
| 16 |
| 17 // https://w3c.github.io/webrtc-pc/#rtcrtpreceiver-interface |
| 18 class RTCRtpReceiver final : public GarbageCollectedFinalized<RTCRtpReceiver>, |
| 19 public ScriptWrappable { |
| 20 DEFINE_WRAPPERTYPEINFO(); |
| 21 |
| 22 public: |
| 23 // Takes ownership of the receiver. |
| 24 RTCRtpReceiver(std::unique_ptr<WebRTCRtpReceiver>, MediaStreamTrack*); |
| 25 |
| 26 MediaStreamTrack* track() const; |
| 27 |
| 28 DECLARE_VIRTUAL_TRACE(); |
| 29 |
| 30 private: |
| 31 std::unique_ptr<WebRTCRtpReceiver> m_receiver; |
| 32 Member<MediaStreamTrack> m_track; |
| 33 }; |
| 34 |
| 35 } // namespace blink |
| 36 |
| 37 #endif // RTCRtpReceiver_h |
OLD | NEW |