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

Side by Side Diff: content/renderer/media/webrtc/rtc_stats.h

Issue 2359103002: WebRTCStatsReport::copyHandle and getStats added (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
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. 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 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 CONTENT_RENDERER_MEDIA_WEBRTC_RTC_STATS_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_WEBRTC_RTC_STATS_H_
6 #define CONTENT_RENDERER_MEDIA_WEBRTC_RTC_STATS_H_ 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_RTC_STATS_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "third_party/WebKit/public/platform/WebRTCStats.h" 9 #include "third_party/WebKit/public/platform/WebRTCStats.h"
10 #include "third_party/webrtc/api/stats/rtcstats.h" 10 #include "third_party/webrtc/api/stats/rtcstats.h"
11 #include "third_party/webrtc/api/stats/rtcstatsreport.h" 11 #include "third_party/webrtc/api/stats/rtcstatsreport.h"
12 12
13 namespace content { 13 namespace content {
14 14
15 class RTCStatsReport : public blink::WebRTCStatsReport { 15 class RTCStatsReport : public blink::WebRTCStatsReport {
16 public: 16 public:
17 RTCStatsReport( 17 RTCStatsReport(
18 const scoped_refptr<const webrtc::RTCStatsReport>& stats_report); 18 const scoped_refptr<const webrtc::RTCStatsReport>& stats_report);
19 ~RTCStatsReport() override; 19 ~RTCStatsReport() override;
20 std::unique_ptr<blink::WebRTCStatsReport> copyHandle() const override;
20 21
22 std::unique_ptr<blink::WebRTCStats> getStats(
23 blink::WebString id) const override;
21 std::unique_ptr<blink::WebRTCStats> next() override; 24 std::unique_ptr<blink::WebRTCStats> next() override;
22 25
23 private: 26 private:
24 const scoped_refptr<const webrtc::RTCStatsReport> stats_report_; 27 const scoped_refptr<const webrtc::RTCStatsReport> stats_report_;
25 webrtc::RTCStatsReport::ConstIterator it_; 28 webrtc::RTCStatsReport::ConstIterator it_;
26 const webrtc::RTCStatsReport::ConstIterator end_; 29 const webrtc::RTCStatsReport::ConstIterator end_;
27 }; 30 };
28 31
29 class RTCStats : public blink::WebRTCStats { 32 class RTCStats : public blink::WebRTCStats {
30 public: 33 public:
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 private: 76 private:
74 // Reference to keep the report that owns |member_|'s stats object alive. 77 // Reference to keep the report that owns |member_|'s stats object alive.
75 const scoped_refptr<const webrtc::RTCStatsReport> stats_owner_; 78 const scoped_refptr<const webrtc::RTCStatsReport> stats_owner_;
76 // Pointer to member of a stats object that is owned by |stats_owner_|. 79 // Pointer to member of a stats object that is owned by |stats_owner_|.
77 const webrtc::RTCStatsMemberInterface* const member_; 80 const webrtc::RTCStatsMemberInterface* const member_;
78 }; 81 };
79 82
80 } // namespace content 83 } // namespace content
81 84
82 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_RTC_STATS_H_ 85 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_RTC_STATS_H_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/webrtc/rtc_stats.cc » ('j') | third_party/WebKit/public/platform/WebRTCStats.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698