| 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 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 483 &constraints); | 483 &constraints); |
| 484 } | 484 } |
| 485 | 485 |
| 486 bool RTCPeerConnectionHandler::addICECandidate( | 486 bool RTCPeerConnectionHandler::addICECandidate( |
| 487 const WebKit::WebRTCICECandidate& candidate) { | 487 const WebKit::WebRTCICECandidate& candidate) { |
| 488 scoped_ptr<webrtc::IceCandidateInterface> native_candidate( | 488 scoped_ptr<webrtc::IceCandidateInterface> native_candidate( |
| 489 dependency_factory_->CreateIceCandidate( | 489 dependency_factory_->CreateIceCandidate( |
| 490 UTF16ToUTF8(candidate.sdpMid()), | 490 UTF16ToUTF8(candidate.sdpMid()), |
| 491 candidate.sdpMLineIndex(), | 491 candidate.sdpMLineIndex(), |
| 492 UTF16ToUTF8(candidate.candidate()))); | 492 UTF16ToUTF8(candidate.candidate()))); |
| 493 if (!native_candidate.get()) { | 493 if (!native_candidate) { |
| 494 LOG(ERROR) << "Could not create native ICE candidate."; | 494 LOG(ERROR) << "Could not create native ICE candidate."; |
| 495 return false; | 495 return false; |
| 496 } | 496 } |
| 497 | 497 |
| 498 bool return_value = | 498 bool return_value = |
| 499 native_peer_connection_->AddIceCandidate(native_candidate.get()); | 499 native_peer_connection_->AddIceCandidate(native_candidate.get()); |
| 500 LOG_IF(ERROR, !return_value) << "Error processing ICE candidate."; | 500 LOG_IF(ERROR, !return_value) << "Error processing ICE candidate."; |
| 501 | 501 |
| 502 if (peer_connection_tracker_) | 502 if (peer_connection_tracker_) |
| 503 peer_connection_tracker_->TrackAddIceCandidate( | 503 peer_connection_tracker_->TrackAddIceCandidate( |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 741 webrtc::SessionDescriptionInterface* native_desc = | 741 webrtc::SessionDescriptionInterface* native_desc = |
| 742 dependency_factory_->CreateSessionDescription(type, sdp, error); | 742 dependency_factory_->CreateSessionDescription(type, sdp, error); |
| 743 | 743 |
| 744 LOG_IF(ERROR, !native_desc) << "Failed to create native session description." | 744 LOG_IF(ERROR, !native_desc) << "Failed to create native session description." |
| 745 << " Type: " << type << " SDP: " << sdp; | 745 << " Type: " << type << " SDP: " << sdp; |
| 746 | 746 |
| 747 return native_desc; | 747 return native_desc; |
| 748 } | 748 } |
| 749 | 749 |
| 750 } // namespace content | 750 } // namespace content |
| OLD | NEW |