Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Unified Diff: third_party/WebKit/public/platform/WebRTCStats.h

Issue 2319543002: WebRTCStats added for surfacing RTCStats from WebRTC to Blink. (Closed)
Patch Set: Addressed comments Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/public/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..6983906dee291786ca6483fb05964401f63a415f
--- /dev/null
+++ b/third_party/WebKit/public/platform/WebRTCStats.h
@@ -0,0 +1,81 @@
+// 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 "WebVector.h"
+
+#include <memory>
+#include <string>
+#include <vector>
+
+namespace blink {
+
+class WebRTCStats;
+class WebRTCStatsMember;
+
+enum WebRTCStatsMemberType {
+ WebRTCStatsMemberTypeInt32, // int32_t
+ WebRTCStatsMemberTypeUint32, // uint32_t
+ WebRTCStatsMemberTypeInt64, // int64_t
+ WebRTCStatsMemberTypeUint64, // uint64_t
+ WebRTCStatsMemberTypeDouble, // double
+ WebRTCStatsMemberTypeString, // WebString
+
+ WebRTCStatsMemberTypeSequenceInt32, // WebVector<int32_t>
+ WebRTCStatsMemberTypeSequenceUint32, // WebVector<uint32_t>
+ WebRTCStatsMemberTypeSequenceInt64, // WebVector<int64_t>
+ WebRTCStatsMemberTypeSequenceUint64, // WebVector<uint64_t>
+ WebRTCStatsMemberTypeSequenceDouble, // WebVector<double>
+ WebRTCStatsMemberTypeSequenceString, // WebVector<WebString>
+};
+
+class WebRTCStatsReport {
+public:
+ virtual ~WebRTCStatsReport() {}
+
+ // The next stats object, or null if the end has been reached.
+ virtual std::unique_ptr<WebRTCStats> next() = 0;
+};
+
+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 ~WebRTCStatsMember() {}
+
+ 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 WebString valueString() const = 0;
+ virtual WebVector<int32_t> valueSequenceInt32() const = 0;
+ virtual WebVector<uint32_t> valueSequenceUint32() const = 0;
+ virtual WebVector<int64_t> valueSequenceInt64() const = 0;
+ virtual WebVector<uint64_t> valueSequenceUint64() const = 0;
+ virtual WebVector<double> valueSequenceDouble() const = 0;
+ virtual WebVector<WebString> valueSequenceString() const = 0;
+};
+
+} // namespace blink
+
+#endif // WebRTCStats_h
« no previous file with comments | « third_party/WebKit/public/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698