Index: third_party/WebKit/public/platform/WebRTCStats.h |
diff --git a/third_party/WebKit/public/platform/WebRTCStats.h b/third_party/WebKit/public/platform/WebRTCStats.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..5b36d05a8553a59eb76bcba4f8708d5e8aa2aa03 |
--- /dev/null |
+++ b/third_party/WebKit/public/platform/WebRTCStats.h |
@@ -0,0 +1,74 @@ |
+// Copyright 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 WebRTCStats_h |
+#define WebRTCStats_h |
+ |
+#include "WebCommon.h" |
+#include "WebString.h" |
+ |
+#include <memory> |
+#include <string> |
+#include <vector> |
+ |
+namespace blink { |
+ |
+class WebRTCStatsMember; |
+ |
+// Corresponds to |webrtc::RTCStatsMemberInterface::Type| in WebRTC. |
perkj_chrome
2016/09/07 14:34:36
Can you really refer to webrtc:: in blink?
hbos_chromium
2016/09/08 08:38:31
Dunno, removed comment.
|
+enum WebRTCStatsMemberType { |
+ WebRTCStatsMemberTypeInt32, |
+ WebRTCStatsMemberTypeUint32, |
+ WebRTCStatsMemberTypeInt64, |
+ WebRTCStatsMemberTypeUint64, |
+ WebRTCStatsMemberTypeDouble, |
+ WebRTCStatsMemberTypeStaticString, |
+ WebRTCStatsMemberTypeString, |
+ |
+ WebRTCStatsMemberTypeSequenceInt32, |
+ WebRTCStatsMemberTypeSequenceUint32, |
+ WebRTCStatsMemberTypeSequenceInt64, |
+ WebRTCStatsMemberTypeSequenceUint64, |
+ WebRTCStatsMemberTypeSequenceDouble, |
+ WebRTCStatsMemberTypeSequenceStaticString, |
+ WebRTCStatsMemberTypeSequenceString, |
+}; |
+ |
+class WebRTCStats { |
+public: |
+ virtual ~WebRTCStats() {} |
+ |
+ virtual WebString id() const = 0; |
+ virtual WebString type() const = 0; |
+ virtual double timestamp() const = 0; |
+ |
+ virtual size_t membersCount() const = 0; |
+ virtual std::unique_ptr<WebRTCStatsMember> getMember(size_t) const = 0; |
+}; |
+ |
+class WebRTCStatsMember { |
+public: |
+ virtual WebString name() const = 0; |
+ virtual WebRTCStatsMemberType type() const = 0; |
+ |
+ // Value getters. No conversion is performed; the function must match the member's |type|. |
+ virtual int32_t valueInt32() const = 0; |
+ virtual uint32_t valueUint32() const = 0; |
+ virtual int64_t valueInt64() const = 0; |
+ virtual uint64_t valueUint64() const = 0; |
+ virtual double valueDouble() const = 0; |
+ virtual const char* valueStaticString() const = 0; |
+ virtual const std::string& valueString() const = 0; |
+ virtual const std::vector<int32_t>& valueSequenceInt32() const = 0; |
+ virtual const std::vector<uint32_t>& valueSequenceUint32() const = 0; |
+ virtual const std::vector<int64_t>& valueSequenceInt64() const = 0; |
+ virtual const std::vector<uint64_t>& valueSequenceUint64() const = 0; |
+ virtual const std::vector<double>& valueSequenceDouble() const = 0; |
+ virtual const std::vector<const char*>& valueSequenceStaticString() const = 0; |
+ virtual const std::vector<std::string>& valueSequenceString() const = 0; |
+}; |
+ |
+} // namespace blink |
+ |
+#endif // WebRTCStats_h |