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 native_peer_connection_->StartRtcEventLog( | |
1454 IPC::PlatformFileForTransitToPlatformFile(file), max_file_size_bytes); | |
Henrik Grunell
2016/05/10 08:44:56
DCHECK the file and size here or somewhere in the
Ivo-OOO until feb 6
2016/05/12 13:23:24
I added a DCHECK for the file, but the size can ac
| |
1455 } | |
1456 | |
1457 void RTCPeerConnectionHandler::StopEventLog() { | |
1458 DCHECK(thread_checker_.CalledOnValidThread()); | |
1459 native_peer_connection_->StopRtcEventLog(); | |
1460 } | |
1461 | |
1450 blink::WebRTCDataChannelHandler* RTCPeerConnectionHandler::createDataChannel( | 1462 blink::WebRTCDataChannelHandler* RTCPeerConnectionHandler::createDataChannel( |
1451 const blink::WebString& label, const blink::WebRTCDataChannelInit& init) { | 1463 const blink::WebString& label, const blink::WebRTCDataChannelInit& init) { |
1452 DCHECK(thread_checker_.CalledOnValidThread()); | 1464 DCHECK(thread_checker_.CalledOnValidThread()); |
1453 TRACE_EVENT0("webrtc", "RTCPeerConnectionHandler::createDataChannel"); | 1465 TRACE_EVENT0("webrtc", "RTCPeerConnectionHandler::createDataChannel"); |
1454 DVLOG(1) << "createDataChannel label " | 1466 DVLOG(1) << "createDataChannel label " |
1455 << base::UTF16ToUTF8(base::StringPiece16(label)); | 1467 << base::UTF16ToUTF8(base::StringPiece16(label)); |
1456 | 1468 |
1457 webrtc::DataChannelInit config; | 1469 webrtc::DataChannelInit config; |
1458 // TODO(jiayl): remove the deprecated reliable field once Libjingle is updated | 1470 // TODO(jiayl): remove the deprecated reliable field once Libjingle is updated |
1459 // to handle that. | 1471 // to handle that. |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1796 } | 1808 } |
1797 | 1809 |
1798 void RTCPeerConnectionHandler::ResetUMAStats() { | 1810 void RTCPeerConnectionHandler::ResetUMAStats() { |
1799 DCHECK(thread_checker_.CalledOnValidThread()); | 1811 DCHECK(thread_checker_.CalledOnValidThread()); |
1800 num_local_candidates_ipv6_ = 0; | 1812 num_local_candidates_ipv6_ = 0; |
1801 num_local_candidates_ipv4_ = 0; | 1813 num_local_candidates_ipv4_ = 0; |
1802 ice_connection_checking_start_ = base::TimeTicks(); | 1814 ice_connection_checking_start_ = base::TimeTicks(); |
1803 memset(ice_state_seen_, 0, sizeof(ice_state_seen_)); | 1815 memset(ice_state_seen_, 0, sizeof(ice_state_seen_)); |
1804 } | 1816 } |
1805 } // namespace content | 1817 } // namespace content |
OLD | NEW |