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

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

Issue 2302873004: Renamed WebRTCStats.h to WebRTCLegacyStats.h and cleaned it up (Closed)
Patch Set: Fixed compile error 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') | third_party/WebKit/public/platform/WebRTCStats.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/public/platform/WebRTCLegacyStats.h
diff --git a/third_party/WebKit/public/platform/WebRTCLegacyStats.h b/third_party/WebKit/public/platform/WebRTCLegacyStats.h
new file mode 100644
index 0000000000000000000000000000000000000000..fde9f4888917c2c0209cb0e89136fe580ad03263
--- /dev/null
+++ b/third_party/WebKit/public/platform/WebRTCLegacyStats.h
@@ -0,0 +1,59 @@
+// 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 WebRTCLegacyStats_h
+#define WebRTCLegacyStats_h
+
+#include "WebCommon.h"
+#include "WebString.h"
+
+namespace blink {
+
+class WebRTCLegacyStatsMemberIterator;
+
+enum WebRTCLegacyStatsMemberType {
+ WebRTCLegacyStatsMemberTypeInt,
+ WebRTCLegacyStatsMemberTypeInt64,
+ WebRTCLegacyStatsMemberTypeFloat,
+ WebRTCLegacyStatsMemberTypeString,
+ WebRTCLegacyStatsMemberTypeBool,
+ WebRTCLegacyStatsMemberTypeId,
+};
+
+class WebRTCLegacyStats {
+public:
+ virtual ~WebRTCLegacyStats() {}
+
+ virtual WebString id() const = 0;
+ virtual WebString type() const = 0;
+ virtual double timestamp() const = 0;
+
+ // The caller owns the iterator. The iterator must not be used after
+ // the |WebRTCLegacyStats| that created it is destroyed.
+ virtual WebRTCLegacyStatsMemberIterator* iterator() const = 0;
+};
+
+class WebRTCLegacyStatsMemberIterator {
+public:
+ virtual ~WebRTCLegacyStatsMemberIterator() {}
+ virtual bool isEnd() const = 0;
+ virtual void next() = 0;
+
+ virtual WebString name() const = 0;
+ virtual WebRTCLegacyStatsMemberType type() const = 0;
+ // Value getters. No conversion is performed; the function must match the
+ // member's |type|.
+ virtual int valueInt() const = 0; // WebRTCLegacyStatsMemberTypeInt
+ virtual int64_t valueInt64() const = 0; // WebRTCLegacyStatsMemberTypeInt64
+ virtual float valueFloat() const = 0; // WebRTCLegacyStatsMemberTypeFloat
+ virtual WebString valueString() const = 0; // WebRTCLegacyStatsMemberTypeString
+ virtual bool valueBool() const = 0; // WebRTCLegacyStatsMemberTypeBool
+
+ // Converts the value to string (regardless of |type|).
+ virtual WebString valueToString() const = 0;
+};
+
+} // namespace blink
+
+#endif // WebRTCLegacyStats_h
« no previous file with comments | « third_party/WebKit/public/BUILD.gn ('k') | third_party/WebKit/public/platform/WebRTCStats.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698