| 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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 181       if (media_permission) { | 181       if (media_permission) { | 
| 182         // Start permission check earlier to reduce any impact to call set up | 182         // Start permission check earlier to reduce any impact to call set up | 
| 183         // time. It's safe to use Unretained here since both destructor and | 183         // time. It's safe to use Unretained here since both destructor and | 
| 184         // Initialize can only be called on the worker thread. | 184         // Initialize can only be called on the worker thread. | 
| 185         task_runner_->PostTask( | 185         task_runner_->PostTask( | 
| 186             FROM_HERE, base::Bind(&FilteringNetworkManager::Initialize, | 186             FROM_HERE, base::Bind(&FilteringNetworkManager::Initialize, | 
| 187                                   base::Unretained(filtering_network_manager))); | 187                                   base::Unretained(filtering_network_manager))); | 
| 188       } | 188       } | 
| 189       network_manager.reset(filtering_network_manager); | 189       network_manager.reset(filtering_network_manager); | 
| 190     } else { | 190     } else { | 
| 191       network_manager.reset(new EmptyNetworkManager()); | 191       network_manager.reset(new EmptyNetworkManager(network_manager_)); | 
| 192     } | 192     } | 
| 193 | 193 | 
| 194     return new P2PPortAllocator(socket_dispatcher_, network_manager.Pass(), | 194     return new P2PPortAllocator(socket_dispatcher_, network_manager.Pass(), | 
| 195                                 socket_factory_, config, origin_, task_runner_); | 195                                 socket_factory_, config, origin_, task_runner_); | 
| 196   } | 196   } | 
| 197 | 197 | 
| 198  protected: | 198  protected: | 
| 199   ~P2PPortAllocatorFactory() override {} | 199   ~P2PPortAllocatorFactory() override {} | 
| 200 | 200 | 
| 201  private: | 201  private: | 
| (...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 806 } | 806 } | 
| 807 | 807 | 
| 808 void PeerConnectionDependencyFactory::EnsureWebRtcAudioDeviceImpl() { | 808 void PeerConnectionDependencyFactory::EnsureWebRtcAudioDeviceImpl() { | 
| 809   if (audio_device_.get()) | 809   if (audio_device_.get()) | 
| 810     return; | 810     return; | 
| 811 | 811 | 
| 812   audio_device_ = new WebRtcAudioDeviceImpl(); | 812   audio_device_ = new WebRtcAudioDeviceImpl(); | 
| 813 } | 813 } | 
| 814 | 814 | 
| 815 }  // namespace content | 815 }  // namespace content | 
| OLD | NEW | 
|---|