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

Side by Side Diff: content/renderer/media/rtc_stats.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 unified diff | Download patch
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698