OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 int audio_output_level; | 218 int audio_output_level; |
219 int audio_input_level; | 219 int audio_input_level; |
220 int bytes_received; | 220 int bytes_received; |
221 int bytes_sent; | 221 int bytes_sent; |
222 int available_receive_bandwidth; | 222 int available_receive_bandwidth; |
223 std::string dtls_cipher; | 223 std::string dtls_cipher; |
224 std::string srtp_cipher; | 224 std::string srtp_cipher; |
225 } stats_; | 225 } stats_; |
226 }; | 226 }; |
227 | 227 |
| 228 // Helper class that just stores the report from the callback. |
| 229 class MockRTCStatsCollectorCallback : public webrtc::RTCStatsCollectorCallback { |
| 230 public: |
| 231 rtc::scoped_refptr<const RTCStatsReport> report() { return report_; } |
| 232 |
| 233 bool called() const { return called_; } |
| 234 |
| 235 protected: |
| 236 void OnStatsDelivered( |
| 237 const rtc::scoped_refptr<const RTCStatsReport>& report) override { |
| 238 report_ = report; |
| 239 called_ = true; |
| 240 } |
| 241 |
| 242 private: |
| 243 bool called_ = false; |
| 244 rtc::scoped_refptr<const RTCStatsReport> report_; |
| 245 }; |
| 246 |
228 } // namespace webrtc | 247 } // namespace webrtc |
229 | 248 |
230 #endif // WEBRTC_PC_TEST_MOCKPEERCONNECTIONOBSERVERS_H_ | 249 #endif // WEBRTC_PC_TEST_MOCKPEERCONNECTIONOBSERVERS_H_ |
OLD | NEW |