OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 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 RTCStatsReport_h |
| 6 #define RTCStatsReport_h |
| 7 |
| 8 #include "bindings/core/v8/Maplike.h" |
| 9 #include "bindings/core/v8/ScriptWrappable.h" |
| 10 #include "platform/heap/GarbageCollected.h" |
| 11 #include "public/platform/WebCString.h" |
| 12 #include "public/platform/WebRTCStats.h" |
| 13 #include "wtf/text/WTFString.h" |
| 14 |
| 15 #include <map> |
| 16 |
| 17 namespace blink { |
| 18 |
| 19 // https://w3c.github.io/webrtc-pc/#rtcstatsreport-object |
| 20 class RTCStatsReport final |
| 21 : public GarbageCollectedFinalized<RTCStatsReport> |
| 22 , public ScriptWrappable |
| 23 , public Maplike<String, v8::Local<v8::Value>> { |
| 24 DEFINE_WRAPPERTYPEINFO(); |
| 25 public: |
| 26 RTCStatsReport(std::unique_ptr<WebRTCStatsReport>); |
| 27 |
| 28 // Maplike<String, v8::Local<v8::Value>> |
| 29 PairIterable<String, v8::Local<v8::Value>>::IterationSource* startIteration(
ScriptState*, ExceptionState&) override; |
| 30 bool getMapEntry(ScriptState*, const String& key, v8::Local<v8::Value>&, Exc
eptionState&) override; |
| 31 |
| 32 DEFINE_INLINE_VIRTUAL_TRACE() { } |
| 33 |
| 34 private: |
| 35 std::unique_ptr<WebRTCStatsReport> m_report; |
| 36 }; |
| 37 |
| 38 } // namespace blink |
| 39 |
| 40 #endif // RTCStatsReport_h |
OLD | NEW |