Index: content/renderer/media/rtc_stats.h |
diff --git a/content/renderer/media/rtc_stats.h b/content/renderer/media/rtc_stats.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..03f9d0a383431c2f1e61ab42e77e1dc94e970fc6 |
--- /dev/null |
+++ b/content/renderer/media/rtc_stats.h |
@@ -0,0 +1,58 @@ |
+// Copyright (c) 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CONTENT_RENDERER_MEDIA_RTC_STATS_H_ |
+#define CONTENT_RENDERER_MEDIA_RTC_STATS_H_ |
+ |
+#include "third_party/WebKit/public/platform/WebRTCStats.h" |
+#include "third_party/webrtc/api/rtcstats.h" |
+ |
+namespace content { |
+ |
+class RTCStats : public blink::WebRTCStats { |
+ public: |
+ RTCStats(const webrtc::RTCStats* stats); |
+ ~RTCStats() override; |
+ |
+ blink::WebString id() const override; |
+ blink::WebString type() const override; |
+ double timestamp() const override; |
+ |
+ size_t membersCount() const override; |
+ std::unique_ptr<blink::WebRTCStatsMember> getMember(size_t i) const override; |
+ |
+ private: |
+ const webrtc::RTCStats* stats_; |
+ std::vector<const webrtc::RTCStatsMemberInterface*> members_; |
perkj_chrome
2016/09/07 14:34:36
Can you add a comment about ownership of members?
hbos_chromium
2016/09/08 08:38:31
Done. Added comment in WebRTCStats.h too.
|
+}; |
+ |
+class RTCStatsMember : public blink::WebRTCStatsMember { |
+ public: |
+ RTCStatsMember(const webrtc::RTCStatsMemberInterface* member); |
+ |
+ blink::WebString name() const override; |
+ blink::WebRTCStatsMemberType type() const override; |
+ |
+ int32_t valueInt32() const override; |
+ uint32_t valueUint32() const override; |
+ int64_t valueInt64() const override; |
+ uint64_t valueUint64() const override; |
+ double valueDouble() const override; |
+ const char* valueStaticString() const override; |
+ const std::string& valueString() const override; |
+ const std::vector<int32_t>& valueSequenceInt32() const override; |
+ const std::vector<uint32_t>& valueSequenceUint32() const override; |
+ const std::vector<int64_t>& valueSequenceInt64() const override; |
+ const std::vector<uint64_t>& valueSequenceUint64() const override; |
+ const std::vector<double>& valueSequenceDouble() const override; |
+ const std::vector<const char*>& valueSequenceStaticString() const override; |
+ const std::vector<std::string>& valueSequenceString() const override; |
+ |
+ private: |
+ const webrtc::RTCStatsMemberInterface* member_; |
perkj_chrome
2016/09/07 14:34:36
comment on lifetime of member_ ?
hbos_chromium
2016/09/08 08:38:31
Done.
|
+}; |
+ |
+} // namespace content |
+ |
+#endif // CONTENT_RENDERER_MEDIA_RTC_STATS_H_ |