| 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/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 } | 180 } |
| 181 | 181 |
| 182 blink::WebRTCPeerConnectionHandler* | 182 blink::WebRTCPeerConnectionHandler* |
| 183 PeerConnectionDependencyFactory::CreateRTCPeerConnectionHandler( | 183 PeerConnectionDependencyFactory::CreateRTCPeerConnectionHandler( |
| 184 blink::WebRTCPeerConnectionHandlerClient* client) { | 184 blink::WebRTCPeerConnectionHandlerClient* client) { |
| 185 // Save histogram data so we can see how much PeerConnetion is used. | 185 // Save histogram data so we can see how much PeerConnetion is used. |
| 186 // The histogram counts the number of calls to the JS API | 186 // The histogram counts the number of calls to the JS API |
| 187 // webKitRTCPeerConnection. | 187 // webKitRTCPeerConnection. |
| 188 UpdateWebRTCMethodCount(WEBKIT_RTC_PEER_CONNECTION); | 188 UpdateWebRTCMethodCount(WEBKIT_RTC_PEER_CONNECTION); |
| 189 | 189 |
| 190 return new RTCPeerConnectionHandler(client, this, GetWebRtcSignalingThread()); | 190 return new RTCPeerConnectionHandler(client, this); |
| 191 } | 191 } |
| 192 | 192 |
| 193 bool PeerConnectionDependencyFactory::InitializeMediaStreamAudioSource( | 193 bool PeerConnectionDependencyFactory::InitializeMediaStreamAudioSource( |
| 194 int render_view_id, | 194 int render_view_id, |
| 195 const blink::WebMediaConstraints& audio_constraints, | 195 const blink::WebMediaConstraints& audio_constraints, |
| 196 MediaStreamAudioSource* source_data) { | 196 MediaStreamAudioSource* source_data) { |
| 197 DVLOG(1) << "InitializeMediaStreamAudioSources()"; | 197 DVLOG(1) << "InitializeMediaStreamAudioSources()"; |
| 198 | 198 |
| 199 // Do additional source initialization if the audio source is a valid | 199 // Do additional source initialization if the audio source is a valid |
| 200 // microphone or tab audio. | 200 // microphone or tab audio. |
| (...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 659 } | 659 } |
| 660 | 660 |
| 661 void PeerConnectionDependencyFactory::EnsureWebRtcAudioDeviceImpl() { | 661 void PeerConnectionDependencyFactory::EnsureWebRtcAudioDeviceImpl() { |
| 662 if (audio_device_.get()) | 662 if (audio_device_.get()) |
| 663 return; | 663 return; |
| 664 | 664 |
| 665 audio_device_ = new WebRtcAudioDeviceImpl(); | 665 audio_device_ = new WebRtcAudioDeviceImpl(); |
| 666 } | 666 } |
| 667 | 667 |
| 668 } // namespace content | 668 } // namespace content |
| OLD | NEW |