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

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

Issue 2016323002: Remove rtc_peer_connection_handler.cc's OverrideDefaultCertificate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removing unnecessary #include, no need to re-run trybots yet Created 4 years, 6 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 #include "media/base/media_permission.h" 54 #include "media/base/media_permission.h"
55 #include "media/filters/ffmpeg_glue.h" 55 #include "media/filters/ffmpeg_glue.h"
56 #include "media/renderers/gpu_video_accelerator_factories.h" 56 #include "media/renderers/gpu_video_accelerator_factories.h"
57 #include "third_party/WebKit/public/platform/WebMediaConstraints.h" 57 #include "third_party/WebKit/public/platform/WebMediaConstraints.h"
58 #include "third_party/WebKit/public/platform/WebMediaStream.h" 58 #include "third_party/WebKit/public/platform/WebMediaStream.h"
59 #include "third_party/WebKit/public/platform/WebMediaStreamSource.h" 59 #include "third_party/WebKit/public/platform/WebMediaStreamSource.h"
60 #include "third_party/WebKit/public/platform/WebMediaStreamTrack.h" 60 #include "third_party/WebKit/public/platform/WebMediaStreamTrack.h"
61 #include "third_party/WebKit/public/platform/WebURL.h" 61 #include "third_party/WebKit/public/platform/WebURL.h"
62 #include "third_party/WebKit/public/web/WebDocument.h" 62 #include "third_party/WebKit/public/web/WebDocument.h"
63 #include "third_party/WebKit/public/web/WebFrame.h" 63 #include "third_party/WebKit/public/web/WebFrame.h"
64 #include "third_party/webrtc/api/dtlsidentitystore.h"
65 #include "third_party/webrtc/api/mediaconstraintsinterface.h" 64 #include "third_party/webrtc/api/mediaconstraintsinterface.h"
66 #include "third_party/webrtc/base/ssladapter.h" 65 #include "third_party/webrtc/base/ssladapter.h"
67 #include "third_party/webrtc/modules/video_coding/codecs/h264/include/h264.h" 66 #include "third_party/webrtc/modules/video_coding/codecs/h264/include/h264.h"
68 67
69 #if defined(OS_ANDROID) 68 #if defined(OS_ANDROID)
70 #include "media/base/android/media_codec_util.h" 69 #include "media/base/android/media_codec_util.h"
71 #endif 70 #endif
72 71
73 namespace content { 72 namespace content {
74 73
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 std::unique_ptr<P2PPortAllocator> port_allocator(new P2PPortAllocator( 401 std::unique_ptr<P2PPortAllocator> port_allocator(new P2PPortAllocator(
403 p2p_socket_dispatcher_, std::move(network_manager), socket_factory_.get(), 402 p2p_socket_dispatcher_, std::move(network_manager), socket_factory_.get(),
404 port_config, requesting_origin, chrome_worker_thread_.task_runner())); 403 port_config, requesting_origin, chrome_worker_thread_.task_runner()));
405 404
406 return GetPcFactory() 405 return GetPcFactory()
407 ->CreatePeerConnection(config, std::move(port_allocator), 406 ->CreatePeerConnection(config, std::move(port_allocator),
408 std::move(identity_store), observer) 407 std::move(identity_store), observer)
409 .get(); 408 .get();
410 } 409 }
411 410
412 // static
413 rtc::scoped_refptr<rtc::RTCCertificate>
414 PeerConnectionDependencyFactory::GenerateDefaultCertificate() {
415 std::unique_ptr<rtc::SSLIdentity> identity(rtc::SSLIdentity::Generate(
416 webrtc::kIdentityName, rtc::KeyParams::ECDSA(rtc::EC_NIST_P256)));
417 return rtc::RTCCertificate::Create(std::move(identity));
418 }
419
420 scoped_refptr<webrtc::MediaStreamInterface> 411 scoped_refptr<webrtc::MediaStreamInterface>
421 PeerConnectionDependencyFactory::CreateLocalMediaStream( 412 PeerConnectionDependencyFactory::CreateLocalMediaStream(
422 const std::string& label) { 413 const std::string& label) {
423 return GetPcFactory()->CreateLocalMediaStream(label).get(); 414 return GetPcFactory()->CreateLocalMediaStream(label).get();
424 } 415 }
425 416
426 scoped_refptr<webrtc::VideoTrackInterface> 417 scoped_refptr<webrtc::VideoTrackInterface>
427 PeerConnectionDependencyFactory::CreateLocalVideoTrack( 418 PeerConnectionDependencyFactory::CreateLocalVideoTrack(
428 const std::string& id, 419 const std::string& id,
429 webrtc::VideoTrackSourceInterface* source) { 420 webrtc::VideoTrackSourceInterface* source) {
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 576
586 void PeerConnectionDependencyFactory::EnsureWebRtcAudioDeviceImpl() { 577 void PeerConnectionDependencyFactory::EnsureWebRtcAudioDeviceImpl() {
587 DCHECK(CalledOnValidThread()); 578 DCHECK(CalledOnValidThread());
588 if (audio_device_.get()) 579 if (audio_device_.get())
589 return; 580 return;
590 581
591 audio_device_ = new WebRtcAudioDeviceImpl(); 582 audio_device_ = new WebRtcAudioDeviceImpl();
592 } 583 }
593 584
594 } // namespace content 585 } // 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