| 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/mock_media_stream_dependency_factory.h" | 5 #include "content/renderer/media/mock_media_stream_dependency_factory.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "content/renderer/media/mock_peer_connection_impl.h" | 8 #include "content/renderer/media/mock_peer_connection_impl.h" |
| 9 #include "third_party/libjingle/source/talk/app/webrtc/mediastreaminterface.h" | 9 #include "third_party/libjingle/source/talk/app/webrtc/mediastreaminterface.h" |
| 10 #include "third_party/libjingle/source/talk/base/scoped_ref_ptr.h" | 10 #include "third_party/libjingle/source/talk/base/scoped_ref_ptr.h" |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 | 341 |
| 342 scoped_refptr<webrtc::VideoSourceInterface> | 342 scoped_refptr<webrtc::VideoSourceInterface> |
| 343 MockMediaStreamDependencyFactory::CreateVideoSource( | 343 MockMediaStreamDependencyFactory::CreateVideoSource( |
| 344 int video_session_id, | 344 int video_session_id, |
| 345 bool is_screencast, | 345 bool is_screencast, |
| 346 const webrtc::MediaConstraintsInterface* constraints) { | 346 const webrtc::MediaConstraintsInterface* constraints) { |
| 347 last_video_source_ = new talk_base::RefCountedObject<MockVideoSource>(); | 347 last_video_source_ = new talk_base::RefCountedObject<MockVideoSource>(); |
| 348 return last_video_source_; | 348 return last_video_source_; |
| 349 } | 349 } |
| 350 | 350 |
| 351 bool MockMediaStreamDependencyFactory::InitializeAudioSource( |
| 352 const StreamDeviceInfo& device_info) { |
| 353 return true; |
| 354 } |
| 355 |
| 351 scoped_refptr<webrtc::LocalMediaStreamInterface> | 356 scoped_refptr<webrtc::LocalMediaStreamInterface> |
| 352 MockMediaStreamDependencyFactory::CreateLocalMediaStream( | 357 MockMediaStreamDependencyFactory::CreateLocalMediaStream( |
| 353 const std::string& label) { | 358 const std::string& label) { |
| 354 DCHECK(mock_pc_factory_created_); | 359 DCHECK(mock_pc_factory_created_); |
| 355 return new talk_base::RefCountedObject<MockLocalMediaStream>(label); | 360 return new talk_base::RefCountedObject<MockLocalMediaStream>(label); |
| 356 } | 361 } |
| 357 | 362 |
| 358 scoped_refptr<webrtc::VideoTrackInterface> | 363 scoped_refptr<webrtc::VideoTrackInterface> |
| 359 MockMediaStreamDependencyFactory::CreateLocalVideoTrack( | 364 MockMediaStreamDependencyFactory::CreateLocalVideoTrack( |
| 360 const std::string& id, | 365 const std::string& id, |
| (...skipping 23 matching lines...) Expand all Loading... |
| 384 } | 389 } |
| 385 | 390 |
| 386 webrtc::IceCandidateInterface* | 391 webrtc::IceCandidateInterface* |
| 387 MockMediaStreamDependencyFactory::CreateIceCandidate( | 392 MockMediaStreamDependencyFactory::CreateIceCandidate( |
| 388 const std::string& sdp_mid, | 393 const std::string& sdp_mid, |
| 389 int sdp_mline_index, | 394 int sdp_mline_index, |
| 390 const std::string& sdp) { | 395 const std::string& sdp) { |
| 391 return new MockIceCandidate(sdp_mid, sdp_mline_index, sdp); | 396 return new MockIceCandidate(sdp_mid, sdp_mline_index, sdp); |
| 392 } | 397 } |
| 393 | 398 |
| 394 void MockMediaStreamDependencyFactory::SetAudioDeviceSessionId(int session_id) { | |
| 395 } | |
| 396 | |
| 397 } // namespace content | 399 } // namespace content |
| OLD | NEW |