| OLD | NEW |
| 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 "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
| 10 #include "third_party/WebKit/public/platform/WebRTCStats.h" | 10 #include "third_party/WebKit/public/platform/WebRTCStats.h" |
| 11 #include "third_party/webrtc/api/stats/rtcstats.h" | 11 #include "third_party/webrtc/api/stats/rtcstats.h" |
| 12 #include "third_party/webrtc/api/stats/rtcstatsreport.h" | 12 #include "third_party/webrtc/api/stats/rtcstatsreport.h" |
| 13 | 13 |
| 14 namespace content { | 14 namespace content { |
| 15 | 15 |
| 16 class CONTENT_EXPORT RTCStatsReport : public blink::WebRTCStatsReport { | 16 class CONTENT_EXPORT RTCStatsReport : public blink::WebRTCStatsReport { |
| 17 public: | 17 public: |
| 18 RTCStatsReport( | 18 RTCStatsReport( |
| 19 const scoped_refptr<const webrtc::RTCStatsReport>& stats_report); | 19 const scoped_refptr<const webrtc::RTCStatsReport>& stats_report); |
| 20 ~RTCStatsReport() override; | 20 ~RTCStatsReport() override; |
| 21 std::unique_ptr<blink::WebRTCStatsReport> CopyHandle() const override; | 21 std::unique_ptr<blink::WebRTCStatsReport> CopyHandle() const override; |
| 22 | 22 |
| 23 std::unique_ptr<blink::WebRTCStats> GetStats( | 23 std::unique_ptr<blink::WebRTCStats> GetStats( |
| 24 blink::WebString id) const override; | 24 blink::WebString id) const override; |
| 25 std::unique_ptr<blink::WebRTCStats> Next() override; | 25 std::unique_ptr<blink::WebRTCStats> Next() override; |
| 26 size_t Size() const override; |
| 26 | 27 |
| 27 private: | 28 private: |
| 28 const scoped_refptr<const webrtc::RTCStatsReport> stats_report_; | 29 const scoped_refptr<const webrtc::RTCStatsReport> stats_report_; |
| 29 webrtc::RTCStatsReport::ConstIterator it_; | 30 webrtc::RTCStatsReport::ConstIterator it_; |
| 30 const webrtc::RTCStatsReport::ConstIterator end_; | 31 const webrtc::RTCStatsReport::ConstIterator end_; |
| 31 }; | 32 }; |
| 32 | 33 |
| 33 class CONTENT_EXPORT RTCStats : public blink::WebRTCStats { | 34 class CONTENT_EXPORT RTCStats : public blink::WebRTCStats { |
| 34 public: | 35 public: |
| 35 RTCStats(const scoped_refptr<const webrtc::RTCStatsReport>& stats_owner, | 36 RTCStats(const scoped_refptr<const webrtc::RTCStatsReport>& stats_owner, |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 const scoped_refptr<const webrtc::RTCStatsReport> stats_owner_; | 83 const scoped_refptr<const webrtc::RTCStatsReport> stats_owner_; |
| 83 // Pointer to member of a stats object that is owned by |stats_owner_|. | 84 // Pointer to member of a stats object that is owned by |stats_owner_|. |
| 84 const webrtc::RTCStatsMemberInterface* const member_; | 85 const webrtc::RTCStatsMemberInterface* const member_; |
| 85 }; | 86 }; |
| 86 | 87 |
| 87 CONTENT_EXPORT void WhitelistStatsForTesting(const char* type); | 88 CONTENT_EXPORT void WhitelistStatsForTesting(const char* type); |
| 88 | 89 |
| 89 } // namespace content | 90 } // namespace content |
| 90 | 91 |
| 91 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_RTC_STATS_H_ | 92 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_RTC_STATS_H_ |
| OLD | NEW |