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