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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 const webrtc::MediaConstraintsInterface* constraints, | 140 const webrtc::MediaConstraintsInterface* constraints, |
141 blink::WebFrame* frame, | 141 blink::WebFrame* frame, |
142 webrtc::PeerConnectionObserver* observer) override; | 142 webrtc::PeerConnectionObserver* observer) override; |
143 scoped_refptr<webrtc::AudioSourceInterface> CreateLocalAudioSource( | 143 scoped_refptr<webrtc::AudioSourceInterface> CreateLocalAudioSource( |
144 const webrtc::MediaConstraintsInterface* constraints) override; | 144 const webrtc::MediaConstraintsInterface* constraints) override; |
145 WebRtcVideoCapturerAdapter* CreateVideoCapturer( | 145 WebRtcVideoCapturerAdapter* CreateVideoCapturer( |
146 bool is_screen_capture) override; | 146 bool is_screen_capture) override; |
147 scoped_refptr<webrtc::VideoTrackSourceInterface> CreateVideoSource( | 147 scoped_refptr<webrtc::VideoTrackSourceInterface> CreateVideoSource( |
148 cricket::VideoCapturer* capturer, | 148 cricket::VideoCapturer* capturer, |
149 const blink::WebMediaConstraints& constraints) override; | 149 const blink::WebMediaConstraints& constraints) override; |
150 scoped_refptr<WebAudioCapturerSource> CreateWebAudioSource( | 150 void CreateWebAudioSource(blink::WebMediaStreamSource* source) override; |
151 blink::WebMediaStreamSource* source) override; | |
152 scoped_refptr<webrtc::MediaStreamInterface> CreateLocalMediaStream( | 151 scoped_refptr<webrtc::MediaStreamInterface> CreateLocalMediaStream( |
153 const std::string& label) override; | 152 const std::string& label) override; |
154 scoped_refptr<webrtc::VideoTrackInterface> CreateLocalVideoTrack( | 153 scoped_refptr<webrtc::VideoTrackInterface> CreateLocalVideoTrack( |
155 const std::string& id, | 154 const std::string& id, |
156 webrtc::VideoTrackSourceInterface* source) override; | 155 webrtc::VideoTrackSourceInterface* source) override; |
157 scoped_refptr<webrtc::VideoTrackInterface> CreateLocalVideoTrack( | 156 scoped_refptr<webrtc::VideoTrackInterface> CreateLocalVideoTrack( |
158 const std::string& id, | 157 const std::string& id, |
159 cricket::VideoCapturer* capturer) override; | 158 cricket::VideoCapturer* capturer) override; |
160 webrtc::SessionDescriptionInterface* CreateSessionDescription( | 159 webrtc::SessionDescriptionInterface* CreateSessionDescription( |
161 const std::string& type, | 160 const std::string& type, |
162 const std::string& sdp, | 161 const std::string& sdp, |
163 webrtc::SdpParseError* error) override; | 162 webrtc::SdpParseError* error) override; |
164 webrtc::IceCandidateInterface* CreateIceCandidate( | 163 webrtc::IceCandidateInterface* CreateIceCandidate( |
165 const std::string& sdp_mid, | 164 const std::string& sdp_mid, |
166 int sdp_mline_index, | 165 int sdp_mline_index, |
167 const std::string& sdp) override; | 166 const std::string& sdp) override; |
168 | 167 |
169 scoped_refptr<WebRtcAudioCapturer> CreateAudioCapturer( | 168 scoped_ptr<WebRtcAudioCapturer> CreateAudioCapturer( |
170 int render_frame_id, | 169 int render_frame_id, |
171 const StreamDeviceInfo& device_info, | 170 const StreamDeviceInfo& device_info, |
172 const blink::WebMediaConstraints& constraints, | 171 const blink::WebMediaConstraints& constraints, |
173 MediaStreamAudioSource* audio_source) override; | 172 MediaStreamAudioSource* audio_source) override; |
174 void FailToCreateNextAudioCapturer() { | 173 void FailToCreateNextAudioCapturer() { |
175 fail_to_create_next_audio_capturer_ = true; | 174 fail_to_create_next_audio_capturer_ = true; |
176 } | 175 } |
177 | 176 |
178 void StartLocalAudioTrack(WebRtcLocalAudioTrack* audio_track) override; | |
179 | |
180 MockAudioSource* last_audio_source() { return last_audio_source_.get(); } | 177 MockAudioSource* last_audio_source() { return last_audio_source_.get(); } |
181 | 178 |
182 private: | 179 private: |
183 bool fail_to_create_next_audio_capturer_; | 180 bool fail_to_create_next_audio_capturer_; |
184 scoped_refptr <MockAudioSource> last_audio_source_; | 181 scoped_refptr <MockAudioSource> last_audio_source_; |
185 | 182 |
186 DISALLOW_COPY_AND_ASSIGN(MockPeerConnectionDependencyFactory); | 183 DISALLOW_COPY_AND_ASSIGN(MockPeerConnectionDependencyFactory); |
187 }; | 184 }; |
188 | 185 |
189 } // namespace content | 186 } // namespace content |
190 | 187 |
191 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_MOCK_PEER_CONNECTION_DEPENDENCY_FACTORY
_H_ | 188 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_MOCK_PEER_CONNECTION_DEPENDENCY_FACTORY
_H_ |
OLD | NEW |