Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(89)

Side by Side Diff: content/renderer/media/webrtc/peer_connection_dependency_factory.cc

Issue 1972853003: content::RTCCertificateGenerator and WebRTC-EnableWebRtcEcdsa update. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/renderer/media/webrtc/peer_connection_dependency_factory.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 19 matching lines...) Expand all
30 #include "content/public/common/webrtc_ip_handling_policy.h" 30 #include "content/public/common/webrtc_ip_handling_policy.h"
31 #include "content/public/renderer/content_renderer_client.h" 31 #include "content/public/renderer/content_renderer_client.h"
32 #include "content/renderer/media/media_stream.h" 32 #include "content/renderer/media/media_stream.h"
33 #include "content/renderer/media/media_stream_audio_processor.h" 33 #include "content/renderer/media/media_stream_audio_processor.h"
34 #include "content/renderer/media/media_stream_audio_processor_options.h" 34 #include "content/renderer/media/media_stream_audio_processor_options.h"
35 #include "content/renderer/media/media_stream_audio_source.h" 35 #include "content/renderer/media/media_stream_audio_source.h"
36 #include "content/renderer/media/media_stream_constraints_util.h" 36 #include "content/renderer/media/media_stream_constraints_util.h"
37 #include "content/renderer/media/media_stream_video_source.h" 37 #include "content/renderer/media/media_stream_video_source.h"
38 #include "content/renderer/media/media_stream_video_track.h" 38 #include "content/renderer/media/media_stream_video_track.h"
39 #include "content/renderer/media/peer_connection_identity_store.h" 39 #include "content/renderer/media/peer_connection_identity_store.h"
40 #include "content/renderer/media/rtc_certificate_generator.h"
40 #include "content/renderer/media/rtc_peer_connection_handler.h" 41 #include "content/renderer/media/rtc_peer_connection_handler.h"
41 #include "content/renderer/media/rtc_video_decoder_factory.h" 42 #include "content/renderer/media/rtc_video_decoder_factory.h"
42 #include "content/renderer/media/rtc_video_encoder_factory.h" 43 #include "content/renderer/media/rtc_video_encoder_factory.h"
43 #include "content/renderer/media/webaudio_capturer_source.h" 44 #include "content/renderer/media/webaudio_capturer_source.h"
44 #include "content/renderer/media/webrtc/media_stream_remote_audio_track.h" 45 #include "content/renderer/media/webrtc/media_stream_remote_audio_track.h"
45 #include "content/renderer/media/webrtc/stun_field_trial.h" 46 #include "content/renderer/media/webrtc/stun_field_trial.h"
46 #include "content/renderer/media/webrtc/webrtc_local_audio_track_adapter.h" 47 #include "content/renderer/media/webrtc/webrtc_local_audio_track_adapter.h"
47 #include "content/renderer/media/webrtc/webrtc_video_capturer_adapter.h" 48 #include "content/renderer/media/webrtc/webrtc_video_capturer_adapter.h"
48 #include "content/renderer/media/webrtc_audio_device_impl.h" 49 #include "content/renderer/media/webrtc_audio_device_impl.h"
49 #include "content/renderer/media/webrtc_local_audio_track.h" 50 #include "content/renderer/media/webrtc_local_audio_track.h"
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 std::unique_ptr<P2PPortAllocator> port_allocator(new P2PPortAllocator( 497 std::unique_ptr<P2PPortAllocator> port_allocator(new P2PPortAllocator(
497 p2p_socket_dispatcher_, std::move(network_manager), socket_factory_.get(), 498 p2p_socket_dispatcher_, std::move(network_manager), socket_factory_.get(),
498 port_config, requesting_origin, chrome_worker_thread_.task_runner())); 499 port_config, requesting_origin, chrome_worker_thread_.task_runner()));
499 500
500 return GetPcFactory() 501 return GetPcFactory()
501 ->CreatePeerConnection(config, std::move(port_allocator), 502 ->CreatePeerConnection(config, std::move(port_allocator),
502 std::move(identity_store), observer) 503 std::move(identity_store), observer)
503 .get(); 504 .get();
504 } 505 }
505 506
506 // static
507 rtc::scoped_refptr<rtc::RTCCertificate>
508 PeerConnectionDependencyFactory::GenerateDefaultCertificate() {
509 std::unique_ptr<rtc::SSLIdentity> identity(rtc::SSLIdentity::Generate(
510 webrtc::kIdentityName, rtc::KeyParams::ECDSA(rtc::EC_NIST_P256)));
511 return rtc::RTCCertificate::Create(std::move(identity));
512 }
513
514 scoped_refptr<webrtc::MediaStreamInterface> 507 scoped_refptr<webrtc::MediaStreamInterface>
515 PeerConnectionDependencyFactory::CreateLocalMediaStream( 508 PeerConnectionDependencyFactory::CreateLocalMediaStream(
516 const std::string& label) { 509 const std::string& label) {
517 return GetPcFactory()->CreateLocalMediaStream(label).get(); 510 return GetPcFactory()->CreateLocalMediaStream(label).get();
518 } 511 }
519 512
520 scoped_refptr<webrtc::AudioSourceInterface> 513 scoped_refptr<webrtc::AudioSourceInterface>
521 PeerConnectionDependencyFactory::CreateLocalAudioSource( 514 PeerConnectionDependencyFactory::CreateLocalAudioSource(
522 const cricket::AudioOptions& options) { 515 const cricket::AudioOptions& options) {
523 scoped_refptr<webrtc::AudioSourceInterface> source = 516 scoped_refptr<webrtc::AudioSourceInterface> source =
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
779 } 772 }
780 773
781 void PeerConnectionDependencyFactory::EnsureWebRtcAudioDeviceImpl() { 774 void PeerConnectionDependencyFactory::EnsureWebRtcAudioDeviceImpl() {
782 if (audio_device_.get()) 775 if (audio_device_.get())
783 return; 776 return;
784 777
785 audio_device_ = new WebRtcAudioDeviceImpl(); 778 audio_device_ = new WebRtcAudioDeviceImpl();
786 } 779 }
787 780
788 } // namespace content 781 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/webrtc/peer_connection_dependency_factory.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698