OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/test_runner/mock_webrtc_peer_connection_handler.h" | 5 #include "components/test_runner/mock_webrtc_peer_connection_handler.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 MockWebRTCLegacyStats video_stats("Mock video", "ssrc", current_date); | 385 MockWebRTCLegacyStats video_stats("Mock video", "ssrc", current_date); |
386 video_stats.addStatistic("type", "video"); | 386 video_stats.addStatistic("type", "video"); |
387 response.addStats(video_stats); | 387 response.addStats(video_stats); |
388 } | 388 } |
389 } | 389 } |
390 interfaces_->GetDelegate()->PostTask(new WebCallbackTask( | 390 interfaces_->GetDelegate()->PostTask(new WebCallbackTask( |
391 base::Bind(&blink::WebRTCStatsRequest::requestSucceeded, | 391 base::Bind(&blink::WebRTCStatsRequest::requestSucceeded, |
392 base::Owned(new WebRTCStatsRequest(request)), response))); | 392 base::Owned(new WebRTCStatsRequest(request)), response))); |
393 } | 393 } |
394 | 394 |
| 395 void MockWebRTCPeerConnectionHandler::getStats( |
| 396 std::unique_ptr<blink::WebRTCStatsReportCallback> callback) { |
| 397 // TODO(hbos): When blink::RTCPeerConnection starts using the new |getStats| |
| 398 // this needs to be implemented. crbug.com/627816. |
| 399 NOTREACHED(); |
| 400 } |
| 401 |
395 void MockWebRTCPeerConnectionHandler::ReportCreationOfDataChannel() { | 402 void MockWebRTCPeerConnectionHandler::ReportCreationOfDataChannel() { |
396 WebRTCDataChannelInit init; | 403 WebRTCDataChannelInit init; |
397 WebRTCDataChannelHandler* remote_data_channel = | 404 WebRTCDataChannelHandler* remote_data_channel = |
398 new MockWebRTCDataChannelHandler("MockRemoteDataChannel", init, | 405 new MockWebRTCDataChannelHandler("MockRemoteDataChannel", init, |
399 interfaces_->GetDelegate()); | 406 interfaces_->GetDelegate()); |
400 client_->didAddRemoteDataChannel(remote_data_channel); | 407 client_->didAddRemoteDataChannel(remote_data_channel); |
401 } | 408 } |
402 | 409 |
403 WebRTCDataChannelHandler* MockWebRTCPeerConnectionHandler::createDataChannel( | 410 WebRTCDataChannelHandler* MockWebRTCPeerConnectionHandler::createDataChannel( |
404 const WebString& label, | 411 const WebString& label, |
(...skipping 12 matching lines...) Expand all Loading... |
417 const WebMediaStreamTrack& track) { | 424 const WebMediaStreamTrack& track) { |
418 return new MockWebRTCDTMFSenderHandler(track, interfaces_->GetDelegate()); | 425 return new MockWebRTCDTMFSenderHandler(track, interfaces_->GetDelegate()); |
419 } | 426 } |
420 | 427 |
421 void MockWebRTCPeerConnectionHandler::stop() { | 428 void MockWebRTCPeerConnectionHandler::stop() { |
422 stopped_ = true; | 429 stopped_ = true; |
423 weak_factory_.InvalidateWeakPtrs(); | 430 weak_factory_.InvalidateWeakPtrs(); |
424 } | 431 } |
425 | 432 |
426 } // namespace test_runner | 433 } // namespace test_runner |
OLD | NEW |