OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 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 CONTENT_RENDERER_MEDIA_RTC_STATS_H_ | |
6 #define CONTENT_RENDERER_MEDIA_RTC_STATS_H_ | |
7 | |
8 #include "third_party/WebKit/public/platform/WebRTCStats.h" | |
9 #include "third_party/webrtc/api/rtcstats.h" | |
10 | |
11 namespace content { | |
12 | |
13 class RTCStats : public blink::WebRTCStats { | |
14 public: | |
15 RTCStats(const webrtc::RTCStats* stats); | |
16 ~RTCStats() override; | |
17 | |
18 blink::WebString id() const override; | |
19 blink::WebString type() const override; | |
20 double timestamp() const override; | |
21 | |
22 size_t membersCount() const override; | |
23 std::unique_ptr<blink::WebRTCStatsMember> getMember(size_t i) const override; | |
24 | |
25 private: | |
26 const webrtc::RTCStats* stats_; | |
27 std::vector<const webrtc::RTCStatsMemberInterface*> members_; | |
perkj_chrome
2016/09/07 14:34:36
Can you add a comment about ownership of members?
hbos_chromium
2016/09/08 08:38:31
Done. Added comment in WebRTCStats.h too.
| |
28 }; | |
29 | |
30 class RTCStatsMember : public blink::WebRTCStatsMember { | |
31 public: | |
32 RTCStatsMember(const webrtc::RTCStatsMemberInterface* member); | |
33 | |
34 blink::WebString name() const override; | |
35 blink::WebRTCStatsMemberType type() const override; | |
36 | |
37 int32_t valueInt32() const override; | |
38 uint32_t valueUint32() const override; | |
39 int64_t valueInt64() const override; | |
40 uint64_t valueUint64() const override; | |
41 double valueDouble() const override; | |
42 const char* valueStaticString() const override; | |
43 const std::string& valueString() const override; | |
44 const std::vector<int32_t>& valueSequenceInt32() const override; | |
45 const std::vector<uint32_t>& valueSequenceUint32() const override; | |
46 const std::vector<int64_t>& valueSequenceInt64() const override; | |
47 const std::vector<uint64_t>& valueSequenceUint64() const override; | |
48 const std::vector<double>& valueSequenceDouble() const override; | |
49 const std::vector<const char*>& valueSequenceStaticString() const override; | |
50 const std::vector<std::string>& valueSequenceString() const override; | |
51 | |
52 private: | |
53 const webrtc::RTCStatsMemberInterface* member_; | |
perkj_chrome
2016/09/07 14:34:36
comment on lifetime of member_ ?
hbos_chromium
2016/09/08 08:38:31
Done.
| |
54 }; | |
55 | |
56 } // namespace content | |
57 | |
58 #endif // CONTENT_RENDERER_MEDIA_RTC_STATS_H_ | |
OLD | NEW |