Chromium Code Reviews| 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 "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "content/renderer/media/mock_peer_connection_impl.h" | 9 #include "content/renderer/media/mock_peer_connection_impl.h" |
| 10 #include "content/renderer/media/webaudio_capturer_source.h" | 10 #include "content/renderer/media/webaudio_capturer_source.h" |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 117 for (ObserverSet::iterator it = observers_.begin(); it != observers_.end(); | 117 for (ObserverSet::iterator it = observers_.begin(); it != observers_.end(); |
| 118 ++it) { | 118 ++it) { |
| 119 (*it)->OnChanged(); | 119 (*it)->OnChanged(); |
| 120 } | 120 } |
| 121 } | 121 } |
| 122 | 122 |
| 123 MockMediaStream::~MockMediaStream() {} | 123 MockMediaStream::~MockMediaStream() {} |
| 124 | 124 |
| 125 class MockRtcVideoCapturer : public WebRtcVideoCapturerAdapter { | 125 class MockRtcVideoCapturer : public WebRtcVideoCapturerAdapter { |
| 126 public: | 126 public: |
| 127 explicit MockRtcVideoCapturer(bool is_screencast) | 127 MockRtcVideoCapturer( |
|
Ami GONE FROM CHROMIUM
2014/05/12 19:46:28
File can be reverted out of this CL?
perkj_chrome
2014/05/12 20:35:12
Done.
| |
| 128 bool is_screencast) | |
| 128 : WebRtcVideoCapturerAdapter(is_screencast), | 129 : WebRtcVideoCapturerAdapter(is_screencast), |
| 129 number_of_capturered_frames_(0), | 130 number_of_capturered_frames_(0), |
| 130 width_(0), | 131 width_(0), |
| 131 height_(0) { | 132 height_(0) { |
| 132 } | 133 } |
| 133 | 134 |
| 134 virtual void OnFrameCaptured( | 135 virtual void OnFrameCaptured( |
| 135 const scoped_refptr<media::VideoFrame>& frame) OVERRIDE { | 136 const scoped_refptr<media::VideoFrame>& frame) OVERRIDE { |
| 136 ++number_of_capturered_frames_; | 137 ++number_of_capturered_frames_; |
| 137 width_ = frame->visible_rect().width(); | 138 width_ = frame->visible_rect().width(); |
| (...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 532 return WebRtcAudioCapturer::CreateCapturer(-1, device_info, | 533 return WebRtcAudioCapturer::CreateCapturer(-1, device_info, |
| 533 constraints, NULL, audio_source); | 534 constraints, NULL, audio_source); |
| 534 } | 535 } |
| 535 | 536 |
| 536 void MockMediaStreamDependencyFactory::StartLocalAudioTrack( | 537 void MockMediaStreamDependencyFactory::StartLocalAudioTrack( |
| 537 WebRtcLocalAudioTrack* audio_track) { | 538 WebRtcLocalAudioTrack* audio_track) { |
| 538 audio_track->Start(); | 539 audio_track->Start(); |
| 539 } | 540 } |
| 540 | 541 |
| 541 } // namespace content | 542 } // namespace content |
| OLD | NEW |