| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 #include "content/renderer/media/peer_connection_tracker.h" | 4 #include "content/renderer/media/peer_connection_tracker.h" |
| 5 | 5 |
| 6 #include <stddef.h> | 6 #include <stddef.h> |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 460 return; | 460 return; |
| 461 std::string value = "type: " + type + ", sdp: " + sdp; | 461 std::string value = "type: " + type + ", sdp: " + sdp; |
| 462 SendPeerConnectionUpdate( | 462 SendPeerConnectionUpdate( |
| 463 id, | 463 id, |
| 464 source == SOURCE_LOCAL ? "setLocalDescription" : "setRemoteDescription", | 464 source == SOURCE_LOCAL ? "setLocalDescription" : "setRemoteDescription", |
| 465 value); | 465 value); |
| 466 } | 466 } |
| 467 | 467 |
| 468 void PeerConnectionTracker::TrackUpdateIce( | 468 void PeerConnectionTracker::TrackUpdateIce( |
| 469 RTCPeerConnectionHandler* pc_handler, | 469 RTCPeerConnectionHandler* pc_handler, |
| 470 const webrtc::PeerConnectionInterface::RTCConfiguration& config, | 470 const webrtc::PeerConnectionInterface::RTCConfiguration& config) { |
| 471 const blink::WebMediaConstraints& options) { | |
| 472 DCHECK(main_thread_.CalledOnValidThread()); | 471 DCHECK(main_thread_.CalledOnValidThread()); |
| 473 int id = GetLocalIDForHandler(pc_handler); | 472 int id = GetLocalIDForHandler(pc_handler); |
| 474 if (id == -1) | 473 if (id == -1) |
| 475 return; | 474 return; |
| 476 | 475 |
| 477 std::ostringstream result; | 476 std::ostringstream result; |
| 478 result << "servers: " << SerializeServers(config.servers) | 477 result << "servers: " << SerializeServers(config.servers) |
| 479 << "iceTransportType: " << SerializeIceTransportType(config.type) | 478 << "iceTransportType: " << SerializeIceTransportType(config.type) |
| 480 << "bundlePolicy: " << SerializeBundlePolicy(config.bundle_policy) | 479 << "bundlePolicy: " << SerializeBundlePolicy(config.bundle_policy) |
| 481 << "rtcpMuxPolicy: " | 480 << "rtcpMuxPolicy: " << SerializeRtcpMuxPolicy(config.rtcp_mux_policy) |
| 482 << SerializeRtcpMuxPolicy(config.rtcp_mux_policy) | 481 << "}"; |
| 483 << "constraints: {" << SerializeMediaConstraints(options) << "}"; | |
| 484 | 482 |
| 485 SendPeerConnectionUpdate( | 483 SendPeerConnectionUpdate( |
| 486 id, | 484 id, |
| 487 "updateIce", | 485 "updateIce", |
| 488 result.str()); | 486 result.str()); |
| 489 } | 487 } |
| 490 | 488 |
| 491 void PeerConnectionTracker::TrackAddIceCandidate( | 489 void PeerConnectionTracker::TrackAddIceCandidate( |
| 492 RTCPeerConnectionHandler* pc_handler, | 490 RTCPeerConnectionHandler* pc_handler, |
| 493 const blink::WebRTCICECandidate& candidate, | 491 const blink::WebRTCICECandidate& candidate, |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 686 DCHECK(main_thread_.CalledOnValidThread()); | 684 DCHECK(main_thread_.CalledOnValidThread()); |
| 687 SendTarget()->Send(new PeerConnectionTrackerHost_UpdatePeerConnection( | 685 SendTarget()->Send(new PeerConnectionTrackerHost_UpdatePeerConnection( |
| 688 local_id, std::string(callback_type), value)); | 686 local_id, std::string(callback_type), value)); |
| 689 } | 687 } |
| 690 | 688 |
| 691 void PeerConnectionTracker::OverrideSendTargetForTesting(RenderThread* target) { | 689 void PeerConnectionTracker::OverrideSendTargetForTesting(RenderThread* target) { |
| 692 send_target_for_test_ = target; | 690 send_target_for_test_ = target; |
| 693 } | 691 } |
| 694 | 692 |
| 695 } // namespace content | 693 } // namespace content |
| OLD | NEW |