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/rtc_peer_connection_handler.h" | 5 #include "content/renderer/media/rtc_peer_connection_handler.h" |
6 | 6 |
7 #include <string.h> | 7 #include <string.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 1429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1440 base::Bind(&GetStatsOnSignalingThread, native_peer_connection_, level, | 1440 base::Bind(&GetStatsOnSignalingThread, native_peer_connection_, level, |
1441 make_scoped_refptr(observer), track_id, track_type)); | 1441 make_scoped_refptr(observer), track_id, track_type)); |
1442 } | 1442 } |
1443 | 1443 |
1444 void RTCPeerConnectionHandler::CloseClientPeerConnection() { | 1444 void RTCPeerConnectionHandler::CloseClientPeerConnection() { |
1445 DCHECK(thread_checker_.CalledOnValidThread()); | 1445 DCHECK(thread_checker_.CalledOnValidThread()); |
1446 if (!is_closed_) | 1446 if (!is_closed_) |
1447 client_->closePeerConnection(); | 1447 client_->closePeerConnection(); |
1448 } | 1448 } |
1449 | 1449 |
| 1450 void RTCPeerConnectionHandler::StartEventLog(IPC::PlatformFileForTransit file, |
| 1451 int64_t max_file_size_bytes) { |
| 1452 DCHECK(thread_checker_.CalledOnValidThread()); |
| 1453 DCHECK(file != IPC::InvalidPlatformFileForTransit()); |
| 1454 native_peer_connection_->StartRtcEventLog( |
| 1455 IPC::PlatformFileForTransitToPlatformFile(file), max_file_size_bytes); |
| 1456 } |
| 1457 |
| 1458 void RTCPeerConnectionHandler::StopEventLog() { |
| 1459 DCHECK(thread_checker_.CalledOnValidThread()); |
| 1460 native_peer_connection_->StopRtcEventLog(); |
| 1461 } |
| 1462 |
1450 blink::WebRTCDataChannelHandler* RTCPeerConnectionHandler::createDataChannel( | 1463 blink::WebRTCDataChannelHandler* RTCPeerConnectionHandler::createDataChannel( |
1451 const blink::WebString& label, const blink::WebRTCDataChannelInit& init) { | 1464 const blink::WebString& label, const blink::WebRTCDataChannelInit& init) { |
1452 DCHECK(thread_checker_.CalledOnValidThread()); | 1465 DCHECK(thread_checker_.CalledOnValidThread()); |
1453 TRACE_EVENT0("webrtc", "RTCPeerConnectionHandler::createDataChannel"); | 1466 TRACE_EVENT0("webrtc", "RTCPeerConnectionHandler::createDataChannel"); |
1454 DVLOG(1) << "createDataChannel label " | 1467 DVLOG(1) << "createDataChannel label " |
1455 << base::UTF16ToUTF8(base::StringPiece16(label)); | 1468 << base::UTF16ToUTF8(base::StringPiece16(label)); |
1456 | 1469 |
1457 webrtc::DataChannelInit config; | 1470 webrtc::DataChannelInit config; |
1458 // TODO(jiayl): remove the deprecated reliable field once Libjingle is updated | 1471 // TODO(jiayl): remove the deprecated reliable field once Libjingle is updated |
1459 // to handle that. | 1472 // to handle that. |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1796 } | 1809 } |
1797 | 1810 |
1798 void RTCPeerConnectionHandler::ResetUMAStats() { | 1811 void RTCPeerConnectionHandler::ResetUMAStats() { |
1799 DCHECK(thread_checker_.CalledOnValidThread()); | 1812 DCHECK(thread_checker_.CalledOnValidThread()); |
1800 num_local_candidates_ipv6_ = 0; | 1813 num_local_candidates_ipv6_ = 0; |
1801 num_local_candidates_ipv4_ = 0; | 1814 num_local_candidates_ipv4_ = 0; |
1802 ice_connection_checking_start_ = base::TimeTicks(); | 1815 ice_connection_checking_start_ = base::TimeTicks(); |
1803 memset(ice_state_seen_, 0, sizeof(ice_state_seen_)); | 1816 memset(ice_state_seen_, 0, sizeof(ice_state_seen_)); |
1804 } | 1817 } |
1805 } // namespace content | 1818 } // namespace content |
OLD | NEW |