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 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 GetNativeIceServers(server_configuration, &servers); | 350 GetNativeIceServers(server_configuration, &servers); |
351 | 351 |
352 RTCMediaConstraints constraints(options); | 352 RTCMediaConstraints constraints(options); |
353 | 353 |
354 if (!CommandLine::ForCurrentProcess()->HasSwitch( | 354 if (!CommandLine::ForCurrentProcess()->HasSwitch( |
355 switches::kDisableSCTPDataChannels)) { | 355 switches::kDisableSCTPDataChannels)) { |
356 constraints.AddOptional( | 356 constraints.AddOptional( |
357 webrtc::MediaConstraintsInterface::kEnableSctpDataChannels, "true"); | 357 webrtc::MediaConstraintsInterface::kEnableSctpDataChannels, "true"); |
358 } | 358 } |
359 | 359 |
| 360 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| 361 switches::kDisableWebRtcEncryption)) { |
| 362 constraints.AddOptional( |
| 363 webrtc::MediaConstraintsInterface::kInternalDisableEncryption, "true"); |
| 364 } |
| 365 |
360 native_peer_connection_ = | 366 native_peer_connection_ = |
361 dependency_factory_->CreatePeerConnection( | 367 dependency_factory_->CreatePeerConnection( |
362 servers, &constraints, frame_, this); | 368 servers, &constraints, frame_, this); |
363 if (!native_peer_connection_.get()) { | 369 if (!native_peer_connection_.get()) { |
364 LOG(ERROR) << "Failed to initialize native PeerConnection."; | 370 LOG(ERROR) << "Failed to initialize native PeerConnection."; |
365 return false; | 371 return false; |
366 } | 372 } |
367 if (peer_connection_tracker_) | 373 if (peer_connection_tracker_) |
368 peer_connection_tracker_->RegisterPeerConnection( | 374 peer_connection_tracker_->RegisterPeerConnection( |
369 this, servers, constraints, frame_); | 375 this, servers, constraints, frame_); |
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
780 webrtc::SessionDescriptionInterface* native_desc = | 786 webrtc::SessionDescriptionInterface* native_desc = |
781 dependency_factory_->CreateSessionDescription(type, sdp, error); | 787 dependency_factory_->CreateSessionDescription(type, sdp, error); |
782 | 788 |
783 LOG_IF(ERROR, !native_desc) << "Failed to create native session description." | 789 LOG_IF(ERROR, !native_desc) << "Failed to create native session description." |
784 << " Type: " << type << " SDP: " << sdp; | 790 << " Type: " << type << " SDP: " << sdp; |
785 | 791 |
786 return native_desc; | 792 return native_desc; |
787 } | 793 } |
788 | 794 |
789 } // namespace content | 795 } // namespace content |
OLD | NEW |