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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 scoped_refptr<webrtc::PeerConnectionInterface> CreatePeerConnection( | 114 scoped_refptr<webrtc::PeerConnectionInterface> CreatePeerConnection( |
115 const webrtc::PeerConnectionInterface::RTCConfiguration& config, | 115 const webrtc::PeerConnectionInterface::RTCConfiguration& config, |
116 blink::WebFrame* frame, | 116 blink::WebFrame* frame, |
117 webrtc::PeerConnectionObserver* observer) override; | 117 webrtc::PeerConnectionObserver* observer) override; |
118 scoped_refptr<webrtc::AudioSourceInterface> CreateLocalAudioSource( | 118 scoped_refptr<webrtc::AudioSourceInterface> CreateLocalAudioSource( |
119 const cricket::AudioOptions& options) override; | 119 const cricket::AudioOptions& options) override; |
120 WebRtcVideoCapturerAdapter* CreateVideoCapturer( | 120 WebRtcVideoCapturerAdapter* CreateVideoCapturer( |
121 bool is_screen_capture) override; | 121 bool is_screen_capture) override; |
122 scoped_refptr<webrtc::VideoTrackSourceInterface> CreateVideoSource( | 122 scoped_refptr<webrtc::VideoTrackSourceInterface> CreateVideoSource( |
123 cricket::VideoCapturer* capturer) override; | 123 cricket::VideoCapturer* capturer) override; |
124 void CreateWebAudioSource(blink::WebMediaStreamSource* source) override; | |
125 scoped_refptr<webrtc::MediaStreamInterface> CreateLocalMediaStream( | 124 scoped_refptr<webrtc::MediaStreamInterface> CreateLocalMediaStream( |
126 const std::string& label) override; | 125 const std::string& label) override; |
127 scoped_refptr<webrtc::VideoTrackInterface> CreateLocalVideoTrack( | 126 scoped_refptr<webrtc::VideoTrackInterface> CreateLocalVideoTrack( |
128 const std::string& id, | 127 const std::string& id, |
129 webrtc::VideoTrackSourceInterface* source) override; | 128 webrtc::VideoTrackSourceInterface* source) override; |
130 scoped_refptr<webrtc::VideoTrackInterface> CreateLocalVideoTrack( | 129 scoped_refptr<webrtc::VideoTrackInterface> CreateLocalVideoTrack( |
131 const std::string& id, | 130 const std::string& id, |
132 cricket::VideoCapturer* capturer) override; | 131 cricket::VideoCapturer* capturer) override; |
133 webrtc::SessionDescriptionInterface* CreateSessionDescription( | 132 webrtc::SessionDescriptionInterface* CreateSessionDescription( |
134 const std::string& type, | 133 const std::string& type, |
135 const std::string& sdp, | 134 const std::string& sdp, |
136 webrtc::SdpParseError* error) override; | 135 webrtc::SdpParseError* error) override; |
137 webrtc::IceCandidateInterface* CreateIceCandidate( | 136 webrtc::IceCandidateInterface* CreateIceCandidate( |
138 const std::string& sdp_mid, | 137 const std::string& sdp_mid, |
139 int sdp_mline_index, | 138 int sdp_mline_index, |
140 const std::string& sdp) override; | 139 const std::string& sdp) override; |
141 | 140 |
142 scoped_ptr<WebRtcAudioCapturer> CreateAudioCapturer( | |
143 int render_frame_id, | |
144 const StreamDeviceInfo& device_info, | |
145 const blink::WebMediaConstraints& constraints, | |
146 MediaStreamAudioSource* audio_source) override; | |
147 void FailToCreateNextAudioCapturer() { | |
148 fail_to_create_next_audio_capturer_ = true; | |
149 } | |
150 | |
151 MockAudioSource* last_audio_source() { return last_audio_source_.get(); } | 141 MockAudioSource* last_audio_source() { return last_audio_source_.get(); } |
152 | 142 |
153 private: | 143 private: |
154 bool fail_to_create_next_audio_capturer_; | 144 bool fail_to_create_next_audio_capturer_; |
155 scoped_refptr <MockAudioSource> last_audio_source_; | 145 scoped_refptr <MockAudioSource> last_audio_source_; |
156 | 146 |
157 DISALLOW_COPY_AND_ASSIGN(MockPeerConnectionDependencyFactory); | 147 DISALLOW_COPY_AND_ASSIGN(MockPeerConnectionDependencyFactory); |
158 }; | 148 }; |
159 | 149 |
160 } // namespace content | 150 } // namespace content |
161 | 151 |
162 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_MOCK_PEER_CONNECTION_DEPENDENCY_FACTORY
_H_ | 152 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_MOCK_PEER_CONNECTION_DEPENDENCY_FACTORY
_H_ |
OLD | NEW |