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

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

Issue 1834323002: MediaStream audio: Refactor 3 separate "glue" implementations into one. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: REBASE + Workaround to ensure MediaStreamAudioProcessor is destroyed on the main thread. Created 4 years, 7 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 scoped_refptr<webrtc::PeerConnectionInterface> CreatePeerConnection( 143 scoped_refptr<webrtc::PeerConnectionInterface> CreatePeerConnection(
144 const webrtc::PeerConnectionInterface::RTCConfiguration& config, 144 const webrtc::PeerConnectionInterface::RTCConfiguration& config,
145 blink::WebFrame* frame, 145 blink::WebFrame* frame,
146 webrtc::PeerConnectionObserver* observer) override; 146 webrtc::PeerConnectionObserver* observer) override;
147 scoped_refptr<webrtc::AudioSourceInterface> CreateLocalAudioSource( 147 scoped_refptr<webrtc::AudioSourceInterface> CreateLocalAudioSource(
148 const cricket::AudioOptions& options) override; 148 const cricket::AudioOptions& options) override;
149 WebRtcVideoCapturerAdapter* CreateVideoCapturer( 149 WebRtcVideoCapturerAdapter* CreateVideoCapturer(
150 bool is_screen_capture) override; 150 bool is_screen_capture) override;
151 scoped_refptr<webrtc::VideoTrackSourceInterface> CreateVideoSource( 151 scoped_refptr<webrtc::VideoTrackSourceInterface> CreateVideoSource(
152 cricket::VideoCapturer* capturer) override; 152 cricket::VideoCapturer* capturer) override;
153 void CreateWebAudioSource(blink::WebMediaStreamSource* source) override;
154 scoped_refptr<webrtc::MediaStreamInterface> CreateLocalMediaStream( 153 scoped_refptr<webrtc::MediaStreamInterface> CreateLocalMediaStream(
155 const std::string& label) override; 154 const std::string& label) override;
156 scoped_refptr<webrtc::VideoTrackInterface> CreateLocalVideoTrack( 155 scoped_refptr<webrtc::VideoTrackInterface> CreateLocalVideoTrack(
157 const std::string& id, 156 const std::string& id,
158 webrtc::VideoTrackSourceInterface* source) override; 157 webrtc::VideoTrackSourceInterface* source) override;
159 scoped_refptr<webrtc::VideoTrackInterface> CreateLocalVideoTrack( 158 scoped_refptr<webrtc::VideoTrackInterface> CreateLocalVideoTrack(
160 const std::string& id, 159 const std::string& id,
161 cricket::VideoCapturer* capturer) override; 160 cricket::VideoCapturer* capturer) override;
162 webrtc::SessionDescriptionInterface* CreateSessionDescription( 161 webrtc::SessionDescriptionInterface* CreateSessionDescription(
163 const std::string& type, 162 const std::string& type,
164 const std::string& sdp, 163 const std::string& sdp,
165 webrtc::SdpParseError* error) override; 164 webrtc::SdpParseError* error) override;
166 webrtc::IceCandidateInterface* CreateIceCandidate( 165 webrtc::IceCandidateInterface* CreateIceCandidate(
167 const std::string& sdp_mid, 166 const std::string& sdp_mid,
168 int sdp_mline_index, 167 int sdp_mline_index,
169 const std::string& sdp) override; 168 const std::string& sdp) override;
170 169
171 std::unique_ptr<WebRtcAudioCapturer> CreateAudioCapturer(
172 int render_frame_id,
173 const StreamDeviceInfo& device_info,
174 const blink::WebMediaConstraints& constraints,
175 MediaStreamAudioSource* audio_source) override;
176 void FailToCreateNextAudioCapturer() {
177 fail_to_create_next_audio_capturer_ = true;
178 }
179
180 MockAudioSource* last_audio_source() { return last_audio_source_.get(); } 170 MockAudioSource* last_audio_source() { return last_audio_source_.get(); }
181 171
172 scoped_refptr<base::SingleThreadTaskRunner> GetWebRtcSignalingThread()
173 const override;
174
182 private: 175 private:
183 bool fail_to_create_next_audio_capturer_; 176 scoped_refptr<MockAudioSource> last_audio_source_;
184 scoped_refptr <MockAudioSource> last_audio_source_; 177 base::Thread signaling_thread_;
185 178
186 DISALLOW_COPY_AND_ASSIGN(MockPeerConnectionDependencyFactory); 179 DISALLOW_COPY_AND_ASSIGN(MockPeerConnectionDependencyFactory);
187 }; 180 };
188 181
189 } // namespace content 182 } // namespace content
190 183
191 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_MOCK_PEER_CONNECTION_DEPENDENCY_FACTORY _H_ 184 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_MOCK_PEER_CONNECTION_DEPENDENCY_FACTORY _H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698