| 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 #include "content/renderer/media/webrtc/rtc_stats.h" | 5 #include "content/renderer/media/webrtc/rtc_stats.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/time/time.h" | 8 #include "base/time/time.h" |
| 9 #include "third_party/webrtc/api/rtcstats.h" | |
| 10 | 9 |
| 11 namespace content { | 10 namespace content { |
| 12 | 11 |
| 13 RTCStatsReport::RTCStatsReport( | 12 RTCStatsReport::RTCStatsReport( |
| 14 const scoped_refptr<const webrtc::RTCStatsReport>& stats_report) | 13 const scoped_refptr<const webrtc::RTCStatsReport>& stats_report) |
| 15 : stats_report_(stats_report), | 14 : stats_report_(stats_report), |
| 16 it_(stats_report_->begin()), | 15 it_(stats_report_->begin()), |
| 17 end_(stats_report_->end()) { | 16 end_(stats_report_->end()) { |
| 18 DCHECK(stats_report_); | 17 DCHECK(stats_report_); |
| 19 } | 18 } |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 blink::WebVector<blink::WebString> RTCStatsMember::valueSequenceString() const { | 167 blink::WebVector<blink::WebString> RTCStatsMember::valueSequenceString() const { |
| 169 const std::vector<std::string>& sequence = | 168 const std::vector<std::string>& sequence = |
| 170 *member_->cast_to<webrtc::RTCStatsMember<std::vector<std::string>>>(); | 169 *member_->cast_to<webrtc::RTCStatsMember<std::vector<std::string>>>(); |
| 171 blink::WebVector<blink::WebString> web_sequence(sequence.size()); | 170 blink::WebVector<blink::WebString> web_sequence(sequence.size()); |
| 172 for (size_t i = 0; i < sequence.size(); ++i) | 171 for (size_t i = 0; i < sequence.size(); ++i) |
| 173 web_sequence[i] = blink::WebString::fromUTF8(sequence[i]); | 172 web_sequence[i] = blink::WebString::fromUTF8(sequence[i]); |
| 174 return web_sequence; | 173 return web_sequence; |
| 175 } | 174 } |
| 176 | 175 |
| 177 } // namespace content | 176 } // namespace content |
| OLD | NEW |