OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/mock_peer_connection_impl.h" | 5 #include "content/renderer/media/mock_peer_connection_impl.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "content/renderer/media/webrtc/mock_peer_connection_dependency_factory.
h" | 10 #include "content/renderer/media/webrtc/mock_peer_connection_dependency_factory.
h" |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 DCHECK_EQ(kStatsOutputLevelStandard, level); | 271 DCHECK_EQ(kStatsOutputLevelStandard, level); |
272 webrtc::StatsReport report1, report2; | 272 webrtc::StatsReport report1, report2; |
273 report1.id = "1234"; | 273 report1.id = "1234"; |
274 report1.type = "ssrc"; | 274 report1.type = "ssrc"; |
275 report1.timestamp = 42; | 275 report1.timestamp = 42; |
276 report1.values.push_back( | 276 report1.values.push_back( |
277 webrtc::StatsReport::Value( | 277 webrtc::StatsReport::Value( |
278 webrtc::StatsReport::kStatsValueNameFingerprint, | 278 webrtc::StatsReport::kStatsValueNameFingerprint, |
279 "trackvalue")); | 279 "trackvalue")); |
280 | 280 |
281 std::vector<webrtc::StatsReport> reports; | 281 webrtc::StatsReports reports; |
282 reports.push_back(report1); | 282 reports.push_back(&report1); |
283 | 283 |
284 // If selector is given, we pass back one report. | 284 // If selector is given, we pass back one report. |
285 // If selector is not given, we pass back two. | 285 // If selector is not given, we pass back two. |
286 if (!track) { | 286 if (!track) { |
287 report2.id = "nontrack"; | 287 report2.id = "nontrack"; |
288 report2.type = "generic"; | 288 report2.type = "generic"; |
289 report2.timestamp = 44; | 289 report2.timestamp = 44; |
290 report2.values.push_back( | 290 report2.values.push_back( |
291 webrtc::StatsReport::Value( | 291 webrtc::StatsReport::Value( |
292 webrtc::StatsReport::kStatsValueNameFingerprintAlgorithm, | 292 webrtc::StatsReport::kStatsValueNameFingerprintAlgorithm, |
293 "somevalue")); | 293 "somevalue")); |
294 reports.push_back(report2); | 294 reports.push_back(&report2); |
295 } | 295 } |
296 | 296 |
297 // Note that the callback is synchronous, not asynchronous; it will | 297 // Note that the callback is synchronous, not asynchronous; it will |
298 // happen before the request call completes. | 298 // happen before the request call completes. |
299 observer->OnComplete(reports); | 299 observer->OnComplete(reports); |
300 | 300 |
301 return true; | 301 return true; |
302 } | 302 } |
303 | 303 |
304 const webrtc::SessionDescriptionInterface* | 304 const webrtc::SessionDescriptionInterface* |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 sdp_mline_index_ = candidate->sdp_mline_index(); | 359 sdp_mline_index_ = candidate->sdp_mline_index(); |
360 return candidate->ToString(&ice_sdp_); | 360 return candidate->ToString(&ice_sdp_); |
361 } | 361 } |
362 | 362 |
363 void MockPeerConnectionImpl::RegisterUMAObserver( | 363 void MockPeerConnectionImpl::RegisterUMAObserver( |
364 webrtc::UMAObserver* observer) { | 364 webrtc::UMAObserver* observer) { |
365 NOTIMPLEMENTED(); | 365 NOTIMPLEMENTED(); |
366 } | 366 } |
367 | 367 |
368 } // namespace content | 368 } // namespace content |
OLD | NEW |