| 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 |
| 356 bool MockMediaStreamDependencyFactory::CreateWebAudioSource( |
| 357 WebKit::WebMediaStreamSource* source) { |
| 358 return true; |
| 359 } |
| 360 |
| 351 scoped_refptr<webrtc::LocalMediaStreamInterface> | 361 scoped_refptr<webrtc::LocalMediaStreamInterface> |
| 352 MockMediaStreamDependencyFactory::CreateLocalMediaStream( | 362 MockMediaStreamDependencyFactory::CreateLocalMediaStream( |
| 353 const std::string& label) { | 363 const std::string& label) { |
| 354 DCHECK(mock_pc_factory_created_); | 364 DCHECK(mock_pc_factory_created_); |
| 355 return new talk_base::RefCountedObject<MockLocalMediaStream>(label); | 365 return new talk_base::RefCountedObject<MockLocalMediaStream>(label); |
| 356 } | 366 } |
| 357 | 367 |
| 358 scoped_refptr<webrtc::VideoTrackInterface> | 368 scoped_refptr<webrtc::VideoTrackInterface> |
| 359 MockMediaStreamDependencyFactory::CreateLocalVideoTrack( | 369 MockMediaStreamDependencyFactory::CreateLocalVideoTrack( |
| 360 const std::string& id, | 370 const std::string& id, |
| (...skipping 23 matching lines...) Expand all Loading... |
| 384 } | 394 } |
| 385 | 395 |
| 386 webrtc::IceCandidateInterface* | 396 webrtc::IceCandidateInterface* |
| 387 MockMediaStreamDependencyFactory::CreateIceCandidate( | 397 MockMediaStreamDependencyFactory::CreateIceCandidate( |
| 388 const std::string& sdp_mid, | 398 const std::string& sdp_mid, |
| 389 int sdp_mline_index, | 399 int sdp_mline_index, |
| 390 const std::string& sdp) { | 400 const std::string& sdp) { |
| 391 return new MockIceCandidate(sdp_mid, sdp_mline_index, sdp); | 401 return new MockIceCandidate(sdp_mid, sdp_mline_index, sdp); |
| 392 } | 402 } |
| 393 | 403 |
| 394 void MockMediaStreamDependencyFactory::SetAudioDeviceSessionId(int session_id) { | |
| 395 } | |
| 396 | |
| 397 } // namespace content | 404 } // namespace content |
| OLD | NEW |