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 <utility> |
7 #include <vector> | 8 #include <vector> |
8 | 9 |
9 #include "base/command_line.h" | 10 #include "base/command_line.h" |
10 #include "base/location.h" | 11 #include "base/location.h" |
11 #include "base/logging.h" | 12 #include "base/logging.h" |
12 #include "base/metrics/field_trial.h" | 13 #include "base/metrics/field_trial.h" |
13 #include "base/strings/string_util.h" | 14 #include "base/strings/string_util.h" |
14 #include "base/strings/utf_string_conversions.h" | 15 #include "base/strings/utf_string_conversions.h" |
15 #include "base/synchronization/waitable_event.h" | 16 #include "base/synchronization/waitable_event.h" |
16 #include "content/common/media/media_stream_messages.h" | 17 #include "content/common/media/media_stream_messages.h" |
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
538 | 539 |
539 const GURL& requesting_origin = | 540 const GURL& requesting_origin = |
540 GURL(web_frame->document().url().spec()).GetOrigin(); | 541 GURL(web_frame->document().url().spec()).GetOrigin(); |
541 | 542 |
542 scoped_refptr<P2PPortAllocatorFactory> pa_factory = | 543 scoped_refptr<P2PPortAllocatorFactory> pa_factory = |
543 new P2PPortAllocatorFactory( | 544 new P2PPortAllocatorFactory( |
544 media_permission.Pass(), p2p_socket_dispatcher_, network_manager_, | 545 media_permission.Pass(), p2p_socket_dispatcher_, network_manager_, |
545 socket_factory_.get(), port_config, requesting_origin, | 546 socket_factory_.get(), port_config, requesting_origin, |
546 chrome_worker_thread_.task_runner()); | 547 chrome_worker_thread_.task_runner()); |
547 | 548 |
548 return GetPcFactory()->CreatePeerConnection(config, | 549 return GetPcFactory() |
549 constraints, | 550 ->CreatePeerConnection(config, constraints, pa_factory.get(), |
550 pa_factory.get(), | 551 std::move(identity_store), observer) |
551 identity_store.Pass(), | 552 .get(); |
552 observer).get(); | |
553 } | 553 } |
554 | 554 |
555 scoped_refptr<webrtc::MediaStreamInterface> | 555 scoped_refptr<webrtc::MediaStreamInterface> |
556 PeerConnectionDependencyFactory::CreateLocalMediaStream( | 556 PeerConnectionDependencyFactory::CreateLocalMediaStream( |
557 const std::string& label) { | 557 const std::string& label) { |
558 return GetPcFactory()->CreateLocalMediaStream(label).get(); | 558 return GetPcFactory()->CreateLocalMediaStream(label).get(); |
559 } | 559 } |
560 | 560 |
561 scoped_refptr<webrtc::AudioSourceInterface> | 561 scoped_refptr<webrtc::AudioSourceInterface> |
562 PeerConnectionDependencyFactory::CreateLocalAudioSource( | 562 PeerConnectionDependencyFactory::CreateLocalAudioSource( |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
813 } | 813 } |
814 | 814 |
815 void PeerConnectionDependencyFactory::EnsureWebRtcAudioDeviceImpl() { | 815 void PeerConnectionDependencyFactory::EnsureWebRtcAudioDeviceImpl() { |
816 if (audio_device_.get()) | 816 if (audio_device_.get()) |
817 return; | 817 return; |
818 | 818 |
819 audio_device_ = new WebRtcAudioDeviceImpl(); | 819 audio_device_ = new WebRtcAudioDeviceImpl(); |
820 } | 820 } |
821 | 821 |
822 } // namespace content | 822 } // namespace content |
OLD | NEW |