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> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
775 TRACE_EVENT0("webrtc", "RTCPeerConnectionHandler::GetStats"); | 775 TRACE_EVENT0("webrtc", "RTCPeerConnectionHandler::GetStats"); |
776 if (!native_peer_connection_->GetStats(observer, track, level)) { | 776 if (!native_peer_connection_->GetStats(observer, track, level)) { |
777 DVLOG(1) << "GetStats failed."; | 777 DVLOG(1) << "GetStats failed."; |
778 // TODO(hta): Consider how to get an error back. | 778 // TODO(hta): Consider how to get an error back. |
779 std::vector<webrtc::StatsReport> no_reports; | 779 std::vector<webrtc::StatsReport> no_reports; |
780 observer->OnComplete(no_reports); | 780 observer->OnComplete(no_reports); |
781 return; | 781 return; |
782 } | 782 } |
783 } | 783 } |
784 | 784 |
| 785 void RTCPeerConnectionHandler::CloseClientPeerConnection() { |
| 786 client_->closePeerConnection(); |
| 787 } |
| 788 |
785 blink::WebRTCDataChannelHandler* RTCPeerConnectionHandler::createDataChannel( | 789 blink::WebRTCDataChannelHandler* RTCPeerConnectionHandler::createDataChannel( |
786 const blink::WebString& label, const blink::WebRTCDataChannelInit& init) { | 790 const blink::WebString& label, const blink::WebRTCDataChannelInit& init) { |
787 DVLOG(1) << "createDataChannel label " << base::UTF16ToUTF8(label); | 791 DVLOG(1) << "createDataChannel label " << base::UTF16ToUTF8(label); |
788 | 792 |
789 webrtc::DataChannelInit config; | 793 webrtc::DataChannelInit config; |
790 // TODO(jiayl): remove the deprecated reliable field once Libjingle is updated | 794 // TODO(jiayl): remove the deprecated reliable field once Libjingle is updated |
791 // to handle that. | 795 // to handle that. |
792 config.reliable = false; | 796 config.reliable = false; |
793 config.id = init.id; | 797 config.id = init.id; |
794 config.ordered = init.ordered; | 798 config.ordered = init.ordered; |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
997 webrtc::SessionDescriptionInterface* native_desc = | 1001 webrtc::SessionDescriptionInterface* native_desc = |
998 dependency_factory_->CreateSessionDescription(type, sdp, error); | 1002 dependency_factory_->CreateSessionDescription(type, sdp, error); |
999 | 1003 |
1000 LOG_IF(ERROR, !native_desc) << "Failed to create native session description." | 1004 LOG_IF(ERROR, !native_desc) << "Failed to create native session description." |
1001 << " Type: " << type << " SDP: " << sdp; | 1005 << " Type: " << type << " SDP: " << sdp; |
1002 | 1006 |
1003 return native_desc; | 1007 return native_desc; |
1004 } | 1008 } |
1005 | 1009 |
1006 } // namespace content | 1010 } // namespace content |
OLD | NEW |