| 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 #ifndef CONTENT_RENDERER_MEDIA_WEBRTC_MOCK_PEER_CONNECTION_DEPENDENCY_FACTORY_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_WEBRTC_MOCK_PEER_CONNECTION_DEPENDENCY_FACTORY_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_MOCK_PEER_CONNECTION_DEPENDENCY_FACTORY_H_ | 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_MOCK_PEER_CONNECTION_DEPENDENCY_FACTORY_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 const webrtc::MediaConstraintsInterface* constraints, | 182 const webrtc::MediaConstraintsInterface* constraints, |
| 183 blink::WebFrame* frame, | 183 blink::WebFrame* frame, |
| 184 webrtc::PeerConnectionObserver* observer) override; | 184 webrtc::PeerConnectionObserver* observer) override; |
| 185 scoped_refptr<webrtc::AudioSourceInterface> CreateLocalAudioSource( | 185 scoped_refptr<webrtc::AudioSourceInterface> CreateLocalAudioSource( |
| 186 const webrtc::MediaConstraintsInterface* constraints) override; | 186 const webrtc::MediaConstraintsInterface* constraints) override; |
| 187 WebRtcVideoCapturerAdapter* CreateVideoCapturer( | 187 WebRtcVideoCapturerAdapter* CreateVideoCapturer( |
| 188 bool is_screen_capture) override; | 188 bool is_screen_capture) override; |
| 189 scoped_refptr<webrtc::VideoSourceInterface> CreateVideoSource( | 189 scoped_refptr<webrtc::VideoSourceInterface> CreateVideoSource( |
| 190 cricket::VideoCapturer* capturer, | 190 cricket::VideoCapturer* capturer, |
| 191 const blink::WebMediaConstraints& constraints) override; | 191 const blink::WebMediaConstraints& constraints) override; |
| 192 scoped_refptr<WebAudioCapturerSource> CreateWebAudioSource( | 192 void CreateWebAudioSource(blink::WebMediaStreamSource* source) override; |
| 193 blink::WebMediaStreamSource* source) override; | |
| 194 scoped_refptr<webrtc::MediaStreamInterface> CreateLocalMediaStream( | 193 scoped_refptr<webrtc::MediaStreamInterface> CreateLocalMediaStream( |
| 195 const std::string& label) override; | 194 const std::string& label) override; |
| 196 scoped_refptr<webrtc::VideoTrackInterface> CreateLocalVideoTrack( | 195 scoped_refptr<webrtc::VideoTrackInterface> CreateLocalVideoTrack( |
| 197 const std::string& id, | 196 const std::string& id, |
| 198 webrtc::VideoSourceInterface* source) override; | 197 webrtc::VideoSourceInterface* source) override; |
| 199 scoped_refptr<webrtc::VideoTrackInterface> CreateLocalVideoTrack( | 198 scoped_refptr<webrtc::VideoTrackInterface> CreateLocalVideoTrack( |
| 200 const std::string& id, | 199 const std::string& id, |
| 201 cricket::VideoCapturer* capturer) override; | 200 cricket::VideoCapturer* capturer) override; |
| 202 webrtc::SessionDescriptionInterface* CreateSessionDescription( | 201 webrtc::SessionDescriptionInterface* CreateSessionDescription( |
| 203 const std::string& type, | 202 const std::string& type, |
| 204 const std::string& sdp, | 203 const std::string& sdp, |
| 205 webrtc::SdpParseError* error) override; | 204 webrtc::SdpParseError* error) override; |
| 206 webrtc::IceCandidateInterface* CreateIceCandidate( | 205 webrtc::IceCandidateInterface* CreateIceCandidate( |
| 207 const std::string& sdp_mid, | 206 const std::string& sdp_mid, |
| 208 int sdp_mline_index, | 207 int sdp_mline_index, |
| 209 const std::string& sdp) override; | 208 const std::string& sdp) override; |
| 210 | 209 |
| 211 scoped_refptr<WebRtcAudioCapturer> CreateAudioCapturer( | 210 scoped_ptr<WebRtcAudioCapturer> CreateAudioCapturer( |
| 212 int render_frame_id, | 211 int render_frame_id, |
| 213 const StreamDeviceInfo& device_info, | 212 const StreamDeviceInfo& device_info, |
| 214 const blink::WebMediaConstraints& constraints, | 213 const blink::WebMediaConstraints& constraints, |
| 215 MediaStreamAudioSource* audio_source) override; | 214 MediaStreamAudioSource* audio_source) override; |
| 216 void FailToCreateNextAudioCapturer() { | 215 void FailToCreateNextAudioCapturer() { |
| 217 fail_to_create_next_audio_capturer_ = true; | 216 fail_to_create_next_audio_capturer_ = true; |
| 218 } | 217 } |
| 219 | 218 |
| 220 void StartLocalAudioTrack(WebRtcLocalAudioTrack* audio_track) override; | |
| 221 | |
| 222 MockAudioSource* last_audio_source() { return last_audio_source_.get(); } | 219 MockAudioSource* last_audio_source() { return last_audio_source_.get(); } |
| 223 MockVideoSource* last_video_source() { return last_video_source_.get(); } | 220 MockVideoSource* last_video_source() { return last_video_source_.get(); } |
| 224 | 221 |
| 225 private: | 222 private: |
| 226 bool fail_to_create_next_audio_capturer_; | 223 bool fail_to_create_next_audio_capturer_; |
| 227 scoped_refptr <MockAudioSource> last_audio_source_; | 224 scoped_refptr <MockAudioSource> last_audio_source_; |
| 228 scoped_refptr <MockVideoSource> last_video_source_; | 225 scoped_refptr <MockVideoSource> last_video_source_; |
| 229 | 226 |
| 230 DISALLOW_COPY_AND_ASSIGN(MockPeerConnectionDependencyFactory); | 227 DISALLOW_COPY_AND_ASSIGN(MockPeerConnectionDependencyFactory); |
| 231 }; | 228 }; |
| 232 | 229 |
| 233 } // namespace content | 230 } // namespace content |
| 234 | 231 |
| 235 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_MOCK_PEER_CONNECTION_DEPENDENCY_FACTORY
_H_ | 232 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_MOCK_PEER_CONNECTION_DEPENDENCY_FACTORY
_H_ |
| OLD | NEW |