| 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 | 4 |
| 5 #include "content/renderer/media/peer_connection_tracker.h" | 5 #include "content/renderer/media/peer_connection_tracker.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 422 const webrtc::PeerConnectionInterface::RTCConfiguration& config, | 422 const webrtc::PeerConnectionInterface::RTCConfiguration& config, |
| 423 const blink::WebMediaConstraints& constraints, | 423 const blink::WebMediaConstraints& constraints, |
| 424 const blink::WebFrame* frame) { | 424 const blink::WebFrame* frame) { |
| 425 DCHECK(main_thread_.CalledOnValidThread()); | 425 DCHECK(main_thread_.CalledOnValidThread()); |
| 426 DCHECK_EQ(GetLocalIDForHandler(pc_handler), -1); | 426 DCHECK_EQ(GetLocalIDForHandler(pc_handler), -1); |
| 427 DVLOG(1) << "PeerConnectionTracker::RegisterPeerConnection()"; | 427 DVLOG(1) << "PeerConnectionTracker::RegisterPeerConnection()"; |
| 428 PeerConnectionInfo info; | 428 PeerConnectionInfo info; |
| 429 | 429 |
| 430 info.lid = GetNextLocalID(); | 430 info.lid = GetNextLocalID(); |
| 431 info.rtc_configuration = | 431 info.rtc_configuration = |
| 432 "{ servers: " + SerializeServers(config.servers) + ", " + | 432 "{ iceServers: " + SerializeServers(config.servers) + ", " + |
| 433 "iceTransportType: " + SerializeIceTransportType(config.type) + ", " + | 433 "iceTransportPolicy: " + SerializeIceTransportType(config.type) + ", " + |
| 434 "bundlePolicy: " + SerializeBundlePolicy(config.bundle_policy) + ", " + | 434 "bundlePolicy: " + SerializeBundlePolicy(config.bundle_policy) + ", " + |
| 435 "rtcpMuxPolicy: " + SerializeRtcpMuxPolicy(config.rtcp_mux_policy) + " }"; | 435 "rtcpMuxPolicy: " + SerializeRtcpMuxPolicy(config.rtcp_mux_policy) + " }"; |
| 436 | 436 |
| 437 info.constraints = SerializeMediaConstraints(constraints); | 437 info.constraints = SerializeMediaConstraints(constraints); |
| 438 if (frame) | 438 if (frame) |
| 439 info.url = frame->document().url().string().utf8(); | 439 info.url = frame->document().url().string().utf8(); |
| 440 else | 440 else |
| 441 info.url = "test:testing"; | 441 info.url = "test:testing"; |
| 442 SendTarget()->Send(new PeerConnectionTrackerHost_AddPeerConnection(info)); | 442 SendTarget()->Send(new PeerConnectionTrackerHost_AddPeerConnection(info)); |
| 443 | 443 |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 738 DCHECK(main_thread_.CalledOnValidThread()); | 738 DCHECK(main_thread_.CalledOnValidThread()); |
| 739 SendTarget()->Send(new PeerConnectionTrackerHost_UpdatePeerConnection( | 739 SendTarget()->Send(new PeerConnectionTrackerHost_UpdatePeerConnection( |
| 740 local_id, std::string(callback_type), value)); | 740 local_id, std::string(callback_type), value)); |
| 741 } | 741 } |
| 742 | 742 |
| 743 void PeerConnectionTracker::OverrideSendTargetForTesting(RenderThread* target) { | 743 void PeerConnectionTracker::OverrideSendTargetForTesting(RenderThread* target) { |
| 744 send_target_for_test_ = target; | 744 send_target_for_test_ = target; |
| 745 } | 745 } |
| 746 | 746 |
| 747 } // namespace content | 747 } // namespace content |
| OLD | NEW |