Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(283)

Side by Side Diff: content/renderer/media/webrtc/mock_peer_connection_dependency_factory.h

Issue 1721273002: MediaStream audio object graph untangling and clean-ups. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 scoped_ptr<WebAudioCapturerSource> CreateWebAudioSource(
193 blink::WebMediaStreamSource* source) override; 193 blink::WebMediaStreamSource* source) override;
194 scoped_refptr<webrtc::MediaStreamInterface> CreateLocalMediaStream( 194 scoped_refptr<webrtc::MediaStreamInterface> CreateLocalMediaStream(
195 const std::string& label) override; 195 const std::string& label) override;
196 scoped_refptr<webrtc::VideoTrackInterface> CreateLocalVideoTrack( 196 scoped_refptr<webrtc::VideoTrackInterface> CreateLocalVideoTrack(
197 const std::string& id, 197 const std::string& id,
198 webrtc::VideoSourceInterface* source) override; 198 webrtc::VideoSourceInterface* source) override;
199 scoped_refptr<webrtc::VideoTrackInterface> CreateLocalVideoTrack( 199 scoped_refptr<webrtc::VideoTrackInterface> CreateLocalVideoTrack(
200 const std::string& id, 200 const std::string& id,
201 cricket::VideoCapturer* capturer) override; 201 cricket::VideoCapturer* capturer) override;
202 webrtc::SessionDescriptionInterface* CreateSessionDescription( 202 webrtc::SessionDescriptionInterface* CreateSessionDescription(
203 const std::string& type, 203 const std::string& type,
204 const std::string& sdp, 204 const std::string& sdp,
205 webrtc::SdpParseError* error) override; 205 webrtc::SdpParseError* error) override;
206 webrtc::IceCandidateInterface* CreateIceCandidate( 206 webrtc::IceCandidateInterface* CreateIceCandidate(
207 const std::string& sdp_mid, 207 const std::string& sdp_mid,
208 int sdp_mline_index, 208 int sdp_mline_index,
209 const std::string& sdp) override; 209 const std::string& sdp) override;
210 210
211 scoped_refptr<WebRtcAudioCapturer> CreateAudioCapturer( 211 scoped_ptr<WebRtcAudioCapturer> CreateAudioCapturer(
212 int render_frame_id, 212 int render_frame_id,
213 const StreamDeviceInfo& device_info, 213 const StreamDeviceInfo& device_info,
214 const blink::WebMediaConstraints& constraints, 214 const blink::WebMediaConstraints& constraints,
215 MediaStreamAudioSource* audio_source) override; 215 MediaStreamAudioSource* audio_source) override;
216 void FailToCreateNextAudioCapturer() { 216 void FailToCreateNextAudioCapturer() {
217 fail_to_create_next_audio_capturer_ = true; 217 fail_to_create_next_audio_capturer_ = true;
218 } 218 }
219 219
220 void StartLocalAudioTrack(WebRtcLocalAudioTrack* audio_track) override;
221
222 MockAudioSource* last_audio_source() { return last_audio_source_.get(); } 220 MockAudioSource* last_audio_source() { return last_audio_source_.get(); }
223 MockVideoSource* last_video_source() { return last_video_source_.get(); } 221 MockVideoSource* last_video_source() { return last_video_source_.get(); }
224 222
225 private: 223 private:
226 bool fail_to_create_next_audio_capturer_; 224 bool fail_to_create_next_audio_capturer_;
227 scoped_refptr <MockAudioSource> last_audio_source_; 225 scoped_refptr <MockAudioSource> last_audio_source_;
228 scoped_refptr <MockVideoSource> last_video_source_; 226 scoped_refptr <MockVideoSource> last_video_source_;
229 227
230 DISALLOW_COPY_AND_ASSIGN(MockPeerConnectionDependencyFactory); 228 DISALLOW_COPY_AND_ASSIGN(MockPeerConnectionDependencyFactory);
231 }; 229 };
232 230
233 } // namespace content 231 } // namespace content
234 232
235 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_MOCK_PEER_CONNECTION_DEPENDENCY_FACTORY _H_ 233 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_MOCK_PEER_CONNECTION_DEPENDENCY_FACTORY _H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698