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

Side by Side Diff: third_party/WebKit/public/platform/WebRTCStats.h

Issue 2490183002: Filter webrtc::RTCStats by whitelist in surfacing them to Blink. (Closed)
Patch Set: git cl format: {\n} -> {} Created 4 years 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/Source/platform/exported/WebRTCStats.cpp ('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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WebRTCStats_h 5 #ifndef WebRTCStats_h
6 #define WebRTCStats_h 6 #define WebRTCStats_h
7 7
8 #include "WebCommon.h" 8 #include "WebCommon.h"
9 #include "WebString.h" 9 #include "WebString.h"
10 #include "WebVector.h" 10 #include "WebVector.h"
(...skipping 18 matching lines...) Expand all
29 29
30 WebRTCStatsMemberTypeSequenceBool, // WebVector<int> 30 WebRTCStatsMemberTypeSequenceBool, // WebVector<int>
31 WebRTCStatsMemberTypeSequenceInt32, // WebVector<int32_t> 31 WebRTCStatsMemberTypeSequenceInt32, // WebVector<int32_t>
32 WebRTCStatsMemberTypeSequenceUint32, // WebVector<uint32_t> 32 WebRTCStatsMemberTypeSequenceUint32, // WebVector<uint32_t>
33 WebRTCStatsMemberTypeSequenceInt64, // WebVector<int64_t> 33 WebRTCStatsMemberTypeSequenceInt64, // WebVector<int64_t>
34 WebRTCStatsMemberTypeSequenceUint64, // WebVector<uint64_t> 34 WebRTCStatsMemberTypeSequenceUint64, // WebVector<uint64_t>
35 WebRTCStatsMemberTypeSequenceDouble, // WebVector<double> 35 WebRTCStatsMemberTypeSequenceDouble, // WebVector<double>
36 WebRTCStatsMemberTypeSequenceString, // WebVector<WebString> 36 WebRTCStatsMemberTypeSequenceString, // WebVector<WebString>
37 }; 37 };
38 38
39 class WebRTCStatsReport { 39 class BLINK_PLATFORM_EXPORT WebRTCStatsReport {
40 public: 40 public:
41 virtual ~WebRTCStatsReport() {} 41 virtual ~WebRTCStatsReport();
42 // Creates a new report object that is a handle to the same underlying stats 42 // Creates a new report object that is a handle to the same underlying stats
43 // report (the stats are not copied). The new report's iterator is reset, 43 // report (the stats are not copied). The new report's iterator is reset,
44 // useful when needing multiple iterators. 44 // useful when needing multiple iterators.
45 virtual std::unique_ptr<WebRTCStatsReport> copyHandle() const = 0; 45 virtual std::unique_ptr<WebRTCStatsReport> copyHandle() const = 0;
46 46
47 // Gets stats object by |id|, or null if no stats with that |id| exists. 47 // Gets stats object by |id|, or null if no stats with that |id| exists.
48 virtual std::unique_ptr<WebRTCStats> getStats(WebString id) const = 0; 48 virtual std::unique_ptr<WebRTCStats> getStats(WebString id) const = 0;
49 // The next stats object, or null if the end has been reached. 49 // The next stats object, or null if the end has been reached.
50 virtual std::unique_ptr<WebRTCStats> next() = 0; 50 virtual std::unique_ptr<WebRTCStats> next() = 0;
51 }; 51 };
52 52
53 class WebRTCStats { 53 class BLINK_PLATFORM_EXPORT WebRTCStats {
54 public: 54 public:
55 virtual ~WebRTCStats() {} 55 virtual ~WebRTCStats();
56 56
57 virtual WebString id() const = 0; 57 virtual WebString id() const = 0;
58 virtual WebString type() const = 0; 58 virtual WebString type() const = 0;
59 virtual double timestamp() const = 0; 59 virtual double timestamp() const = 0;
60 60
61 virtual size_t membersCount() const = 0; 61 virtual size_t membersCount() const = 0;
62 virtual std::unique_ptr<WebRTCStatsMember> getMember(size_t) const = 0; 62 virtual std::unique_ptr<WebRTCStatsMember> getMember(size_t) const = 0;
63 }; 63 };
64 64
65 class WebRTCStatsMember { 65 class BLINK_PLATFORM_EXPORT WebRTCStatsMember {
66 public: 66 public:
67 virtual ~WebRTCStatsMember() {} 67 virtual ~WebRTCStatsMember();
68 68
69 virtual WebString name() const = 0; 69 virtual WebString name() const = 0;
70 virtual WebRTCStatsMemberType type() const = 0; 70 virtual WebRTCStatsMemberType type() const = 0;
71 virtual bool isDefined() const = 0; 71 virtual bool isDefined() const = 0;
72 72
73 // Value getters. No conversion is performed; the function must match the 73 // Value getters. No conversion is performed; the function must match the
74 // member's |type|. 74 // member's |type|.
75 virtual bool valueBool() const = 0; 75 virtual bool valueBool() const = 0;
76 virtual int32_t valueInt32() const = 0; 76 virtual int32_t valueInt32() const = 0;
77 virtual uint32_t valueUint32() const = 0; 77 virtual uint32_t valueUint32() const = 0;
78 virtual int64_t valueInt64() const = 0; 78 virtual int64_t valueInt64() const = 0;
79 virtual uint64_t valueUint64() const = 0; 79 virtual uint64_t valueUint64() const = 0;
80 virtual double valueDouble() const = 0; 80 virtual double valueDouble() const = 0;
81 virtual WebString valueString() const = 0; 81 virtual WebString valueString() const = 0;
82 // |WebVector<int> because |WebVector| is incompatible with |bool|. 82 // |WebVector<int> because |WebVector| is incompatible with |bool|.
83 virtual WebVector<int> valueSequenceBool() const = 0; 83 virtual WebVector<int> valueSequenceBool() const = 0;
84 virtual WebVector<int32_t> valueSequenceInt32() const = 0; 84 virtual WebVector<int32_t> valueSequenceInt32() const = 0;
85 virtual WebVector<uint32_t> valueSequenceUint32() const = 0; 85 virtual WebVector<uint32_t> valueSequenceUint32() const = 0;
86 virtual WebVector<int64_t> valueSequenceInt64() const = 0; 86 virtual WebVector<int64_t> valueSequenceInt64() const = 0;
87 virtual WebVector<uint64_t> valueSequenceUint64() const = 0; 87 virtual WebVector<uint64_t> valueSequenceUint64() const = 0;
88 virtual WebVector<double> valueSequenceDouble() const = 0; 88 virtual WebVector<double> valueSequenceDouble() const = 0;
89 virtual WebVector<WebString> valueSequenceString() const = 0; 89 virtual WebVector<WebString> valueSequenceString() const = 0;
90 }; 90 };
91 91
92 class WebRTCStatsReportCallback { 92 class BLINK_PLATFORM_EXPORT WebRTCStatsReportCallback {
93 public: 93 public:
94 virtual ~WebRTCStatsReportCallback() {} 94 virtual ~WebRTCStatsReportCallback();
95 95
96 virtual void OnStatsDelivered(std::unique_ptr<WebRTCStatsReport>) = 0; 96 virtual void OnStatsDelivered(std::unique_ptr<WebRTCStatsReport>) = 0;
97 }; 97 };
98 98
99 } // namespace blink 99 } // namespace blink
100 100
101 #endif // WebRTCStats_h 101 #endif // WebRTCStats_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/exported/WebRTCStats.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698