| 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 <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 470 port_config.enable_multiple_routes) { | 470 port_config.enable_multiple_routes) { |
| 471 RenderFrameImpl* render_frame = RenderFrameImpl::FromWebFrame(web_frame); | 471 RenderFrameImpl* render_frame = RenderFrameImpl::FromWebFrame(web_frame); |
| 472 if (render_frame) { | 472 if (render_frame) { |
| 473 media_permission = render_frame->CreateMediaPermissionProxy( | 473 media_permission = render_frame->CreateMediaPermissionProxy( |
| 474 chrome_worker_thread_.task_runner()); | 474 chrome_worker_thread_.task_runner()); |
| 475 DCHECK(media_permission); | 475 DCHECK(media_permission); |
| 476 } | 476 } |
| 477 } | 477 } |
| 478 | 478 |
| 479 if (!enforce_preferences) { | 479 if (!enforce_preferences) { |
| 480 VLOG(3) << "WebRTC routing preferences will not be enforced"; |
| 480 port_config.enable_multiple_routes = true; | 481 port_config.enable_multiple_routes = true; |
| 481 port_config.enable_nonproxied_udp = true; | 482 port_config.enable_nonproxied_udp = true; |
| 483 } else { |
| 484 VLOG(3) << "WebRTC routing preferences: multiple_routes: " |
| 485 << port_config.enable_multiple_routes |
| 486 << ", nonproxied_udp: " << port_config.enable_nonproxied_udp; |
| 482 } | 487 } |
| 483 | 488 |
| 484 const GURL& requesting_origin = | 489 const GURL& requesting_origin = |
| 485 GURL(web_frame->document().url().spec()).GetOrigin(); | 490 GURL(web_frame->document().url().spec()).GetOrigin(); |
| 486 | 491 |
| 487 scoped_refptr<P2PPortAllocatorFactory> pa_factory = | 492 scoped_refptr<P2PPortAllocatorFactory> pa_factory = |
| 488 new P2PPortAllocatorFactory( | 493 new P2PPortAllocatorFactory( |
| 489 media_permission.Pass(), p2p_socket_dispatcher_, network_manager_, | 494 media_permission.Pass(), p2p_socket_dispatcher_, network_manager_, |
| 490 socket_factory_.get(), port_config, requesting_origin, | 495 socket_factory_.get(), port_config, requesting_origin, |
| 491 chrome_worker_thread_.task_runner()); | 496 chrome_worker_thread_.task_runner()); |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 749 } | 754 } |
| 750 | 755 |
| 751 void PeerConnectionDependencyFactory::EnsureWebRtcAudioDeviceImpl() { | 756 void PeerConnectionDependencyFactory::EnsureWebRtcAudioDeviceImpl() { |
| 752 if (audio_device_.get()) | 757 if (audio_device_.get()) |
| 753 return; | 758 return; |
| 754 | 759 |
| 755 audio_device_ = new WebRtcAudioDeviceImpl(); | 760 audio_device_ = new WebRtcAudioDeviceImpl(); |
| 756 } | 761 } |
| 757 | 762 |
| 758 } // namespace content | 763 } // namespace content |
| OLD | NEW |