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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/public/BUILD.gn ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef WebRTCStats_h
6 #define WebRTCStats_h
7
8 #include "WebCommon.h"
9 #include "WebString.h"
10 #include "WebVector.h"
11
12 #include <memory>
13 #include <string>
14 #include <vector>
15
16 namespace blink {
17
18 class WebRTCStats;
19 class WebRTCStatsMember;
20
21 enum WebRTCStatsMemberType {
22 WebRTCStatsMemberTypeInt32, // int32_t
23 WebRTCStatsMemberTypeUint32, // uint32_t
24 WebRTCStatsMemberTypeInt64, // int64_t
25 WebRTCStatsMemberTypeUint64, // uint64_t
26 WebRTCStatsMemberTypeDouble, // double
27 WebRTCStatsMemberTypeString, // WebString
28
29 WebRTCStatsMemberTypeSequenceInt32, // WebVector<int32_t>
30 WebRTCStatsMemberTypeSequenceUint32, // WebVector<uint32_t>
31 WebRTCStatsMemberTypeSequenceInt64, // WebVector<int64_t>
32 WebRTCStatsMemberTypeSequenceUint64, // WebVector<uint64_t>
33 WebRTCStatsMemberTypeSequenceDouble, // WebVector<double>
34 WebRTCStatsMemberTypeSequenceString, // WebVector<WebString>
35 };
36
37 class WebRTCStatsReport {
38 public:
39 virtual ~WebRTCStatsReport() {}
40
41 // The next stats object, or null if the end has been reached.
42 virtual std::unique_ptr<WebRTCStats> next() = 0;
43 };
44
45 class WebRTCStats {
46 public:
47 virtual ~WebRTCStats() {}
48
49 virtual WebString id() const = 0;
50 virtual WebString type() const = 0;
51 virtual double timestamp() const = 0;
52
53 virtual size_t membersCount() const = 0;
54 virtual std::unique_ptr<WebRTCStatsMember> getMember(size_t) const = 0;
55 };
56
57 class WebRTCStatsMember {
58 public:
59 virtual ~WebRTCStatsMember() {}
60
61 virtual WebString name() const = 0;
62 virtual WebRTCStatsMemberType type() const = 0;
63
64 // Value getters. No conversion is performed; the function must match the me mber's |type|.
65 virtual int32_t valueInt32() const = 0;
66 virtual uint32_t valueUint32() const = 0;
67 virtual int64_t valueInt64() const = 0;
68 virtual uint64_t valueUint64() const = 0;
69 virtual double valueDouble() const = 0;
70 virtual WebString valueString() const = 0;
71 virtual WebVector<int32_t> valueSequenceInt32() const = 0;
72 virtual WebVector<uint32_t> valueSequenceUint32() const = 0;
73 virtual WebVector<int64_t> valueSequenceInt64() const = 0;
74 virtual WebVector<uint64_t> valueSequenceUint64() const = 0;
75 virtual WebVector<double> valueSequenceDouble() const = 0;
76 virtual WebVector<WebString> valueSequenceString() const = 0;
77 };
78
79 } // namespace blink
80
81 #endif // WebRTCStats_h
OLDNEW
« 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