| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/media_stream_dependency_factory.h" | 5 #include "content/renderer/media/media_stream_dependency_factory.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/synchronization/waitable_event.h" | 9 #include "base/synchronization/waitable_event.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 402 return webrtc::CreateSessionDescription(type, sdp); | 402 return webrtc::CreateSessionDescription(type, sdp); |
| 403 } | 403 } |
| 404 | 404 |
| 405 webrtc::IceCandidateInterface* MediaStreamDependencyFactory::CreateIceCandidate( | 405 webrtc::IceCandidateInterface* MediaStreamDependencyFactory::CreateIceCandidate( |
| 406 const std::string& sdp_mid, | 406 const std::string& sdp_mid, |
| 407 int sdp_mline_index, | 407 int sdp_mline_index, |
| 408 const std::string& sdp) { | 408 const std::string& sdp) { |
| 409 return webrtc::CreateIceCandidate(sdp_mid, sdp_mline_index, sdp); | 409 return webrtc::CreateIceCandidate(sdp_mid, sdp_mline_index, sdp); |
| 410 } | 410 } |
| 411 | 411 |
| 412 WebRtcAudioDeviceImpl* |
| 413 MediaStreamDependencyFactory::GetWebRtcAudioDevice() { |
| 414 return audio_device_; |
| 415 } |
| 416 |
| 412 void MediaStreamDependencyFactory::SetAudioDeviceSessionId(int session_id) { | 417 void MediaStreamDependencyFactory::SetAudioDeviceSessionId(int session_id) { |
| 413 audio_device_->SetSessionId(session_id); | 418 audio_device_->SetSessionId(session_id); |
| 414 } | 419 } |
| 415 | 420 |
| 416 void MediaStreamDependencyFactory::InitializeWorkerThread( | 421 void MediaStreamDependencyFactory::InitializeWorkerThread( |
| 417 talk_base::Thread** thread, | 422 talk_base::Thread** thread, |
| 418 base::WaitableEvent* event) { | 423 base::WaitableEvent* event) { |
| 419 jingle_glue::JingleThreadWrapper::EnsureForCurrentMessageLoop(); | 424 jingle_glue::JingleThreadWrapper::EnsureForCurrentMessageLoop(); |
| 420 jingle_glue::JingleThreadWrapper::current()->set_send_allowed(true); | 425 jingle_glue::JingleThreadWrapper::current()->set_send_allowed(true); |
| 421 *thread = jingle_glue::JingleThreadWrapper::current(); | 426 *thread = jingle_glue::JingleThreadWrapper::current(); |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 // processed before returning. We wait for the above task to finish before | 509 // processed before returning. We wait for the above task to finish before |
| 505 // letting the the function continue to avoid any potential race issues. | 510 // letting the the function continue to avoid any potential race issues. |
| 506 chrome_worker_thread_.Stop(); | 511 chrome_worker_thread_.Stop(); |
| 507 } else { | 512 } else { |
| 508 NOTREACHED() << "Worker thread not running."; | 513 NOTREACHED() << "Worker thread not running."; |
| 509 } | 514 } |
| 510 } | 515 } |
| 511 } | 516 } |
| 512 | 517 |
| 513 } // namespace content | 518 } // namespace content |
| OLD | NEW |