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

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

Issue 2319543002: WebRTCStats added for surfacing RTCStats from WebRTC to Blink. (Closed)
Patch Set: 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
« content/renderer/media/rtc_stats.cc ('K') | « 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..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
« content/renderer/media/rtc_stats.cc ('K') | « third_party/WebKit/public/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698