Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/webrtc/peer_connection_dependency_factory.h" | 5 #include "content/renderer/media/webrtc/peer_connection_dependency_factory.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 255 webrtc::CreateBuiltinAudioEncoderFactory(), | 255 webrtc::CreateBuiltinAudioEncoderFactory(), |
| 256 webrtc::CreateBuiltinAudioDecoderFactory(), encoder_factory.release(), | 256 webrtc::CreateBuiltinAudioDecoderFactory(), encoder_factory.release(), |
| 257 decoder_factory.release()); | 257 decoder_factory.release()); |
| 258 CHECK(pc_factory_.get()); | 258 CHECK(pc_factory_.get()); |
| 259 | 259 |
| 260 webrtc::PeerConnectionFactoryInterface::Options factory_options; | 260 webrtc::PeerConnectionFactoryInterface::Options factory_options; |
| 261 factory_options.disable_sctp_data_channels = false; | 261 factory_options.disable_sctp_data_channels = false; |
| 262 factory_options.disable_encryption = | 262 factory_options.disable_encryption = |
| 263 cmd_line->HasSwitch(switches::kDisableWebRtcEncryption); | 263 cmd_line->HasSwitch(switches::kDisableWebRtcEncryption); |
| 264 | 264 |
| 265 if (cmd_line->HasSwitch(switches::kEnableWebRtcGcm)) { | |
|
juberti
2017/03/21 05:37:07
I prefer the style in the lines above, e.g. x = Ha
joachim
2017/03/21 21:56:58
Done.
| |
| 266 factory_options.crypto_options.enable_gcm_crypto_suites = true; | |
| 267 } | |
| 265 pc_factory_->SetOptions(factory_options); | 268 pc_factory_->SetOptions(factory_options); |
| 266 | 269 |
| 267 event->Signal(); | 270 event->Signal(); |
| 268 } | 271 } |
| 269 | 272 |
| 270 bool PeerConnectionDependencyFactory::PeerConnectionFactoryCreated() { | 273 bool PeerConnectionDependencyFactory::PeerConnectionFactoryCreated() { |
| 271 return pc_factory_.get() != NULL; | 274 return pc_factory_.get() != NULL; |
| 272 } | 275 } |
| 273 | 276 |
| 274 scoped_refptr<webrtc::PeerConnectionInterface> | 277 scoped_refptr<webrtc::PeerConnectionInterface> |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 553 | 556 |
| 554 void PeerConnectionDependencyFactory::EnsureWebRtcAudioDeviceImpl() { | 557 void PeerConnectionDependencyFactory::EnsureWebRtcAudioDeviceImpl() { |
| 555 DCHECK(CalledOnValidThread()); | 558 DCHECK(CalledOnValidThread()); |
| 556 if (audio_device_.get()) | 559 if (audio_device_.get()) |
| 557 return; | 560 return; |
| 558 | 561 |
| 559 audio_device_ = new WebRtcAudioDeviceImpl(); | 562 audio_device_ = new WebRtcAudioDeviceImpl(); |
| 560 } | 563 } |
| 561 | 564 |
| 562 } // namespace content | 565 } // namespace content |
| OLD | NEW |