OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_MOCK_MEDIA_STREAM_DEPENDENCY_FACTORY_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_DEPENDENCY_FACTORY_H_ |
6 #define CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_DEPENDENCY_FACTORY_H_ | 6 #define CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_DEPENDENCY_FACTORY_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 webrtc::PeerConnectionObserver* observer) OVERRIDE; | 120 webrtc::PeerConnectionObserver* observer) OVERRIDE; |
121 virtual scoped_refptr<webrtc::AudioSourceInterface> | 121 virtual scoped_refptr<webrtc::AudioSourceInterface> |
122 CreateLocalAudioSource( | 122 CreateLocalAudioSource( |
123 const webrtc::MediaConstraintsInterface* constraints) OVERRIDE; | 123 const webrtc::MediaConstraintsInterface* constraints) OVERRIDE; |
124 virtual scoped_refptr<webrtc::VideoSourceInterface> | 124 virtual scoped_refptr<webrtc::VideoSourceInterface> |
125 CreateLocalVideoSource( | 125 CreateLocalVideoSource( |
126 int video_session_id, | 126 int video_session_id, |
127 bool is_screencast, | 127 bool is_screencast, |
128 const webrtc::MediaConstraintsInterface* constraints) OVERRIDE; | 128 const webrtc::MediaConstraintsInterface* constraints) OVERRIDE; |
129 virtual scoped_refptr<WebRtcAudioCapturer> CreateWebAudioSource( | 129 virtual scoped_refptr<WebRtcAudioCapturer> CreateWebAudioSource( |
130 WebKit::WebMediaStreamSource* source) OVERRIDE; | 130 WebKit::WebMediaStreamSource* source, |
| 131 RTCMediaConstraints* constraints) OVERRIDE; |
131 virtual scoped_refptr<webrtc::MediaStreamInterface> | 132 virtual scoped_refptr<webrtc::MediaStreamInterface> |
132 CreateLocalMediaStream(const std::string& label) OVERRIDE; | 133 CreateLocalMediaStream(const std::string& label) OVERRIDE; |
133 virtual scoped_refptr<webrtc::VideoTrackInterface> | 134 virtual scoped_refptr<webrtc::VideoTrackInterface> |
134 CreateLocalVideoTrack(const std::string& id, | 135 CreateLocalVideoTrack(const std::string& id, |
135 webrtc::VideoSourceInterface* source) OVERRIDE; | 136 webrtc::VideoSourceInterface* source) OVERRIDE; |
136 virtual scoped_refptr<webrtc::VideoTrackInterface> | 137 virtual scoped_refptr<webrtc::VideoTrackInterface> |
137 CreateLocalVideoTrack(const std::string& id, | 138 CreateLocalVideoTrack(const std::string& id, |
138 cricket::VideoCapturer* capturer) OVERRIDE; | 139 cricket::VideoCapturer* capturer) OVERRIDE; |
139 virtual scoped_refptr<webrtc::AudioTrackInterface> | 140 virtual scoped_refptr<webrtc::AudioTrackInterface> CreateLocalAudioTrack( |
140 CreateLocalAudioTrack(const std::string& id, | 141 const std::string& id, |
141 const scoped_refptr<WebRtcAudioCapturer>& capturer, | 142 const scoped_refptr<WebRtcAudioCapturer>& capturer, |
142 webrtc::AudioSourceInterface* source) OVERRIDE; | 143 webrtc::AudioSourceInterface* source, |
| 144 const webrtc::MediaConstraintsInterface* constraints) OVERRIDE; |
143 virtual webrtc::SessionDescriptionInterface* CreateSessionDescription( | 145 virtual webrtc::SessionDescriptionInterface* CreateSessionDescription( |
144 const std::string& type, | 146 const std::string& type, |
145 const std::string& sdp, | 147 const std::string& sdp, |
146 webrtc::SdpParseError* error) OVERRIDE; | 148 webrtc::SdpParseError* error) OVERRIDE; |
147 virtual webrtc::IceCandidateInterface* CreateIceCandidate( | 149 virtual webrtc::IceCandidateInterface* CreateIceCandidate( |
148 const std::string& sdp_mid, | 150 const std::string& sdp_mid, |
149 int sdp_mline_index, | 151 int sdp_mline_index, |
150 const std::string& sdp) OVERRIDE; | 152 const std::string& sdp) OVERRIDE; |
151 | 153 |
152 virtual bool EnsurePeerConnectionFactory() OVERRIDE; | 154 virtual bool EnsurePeerConnectionFactory() OVERRIDE; |
153 virtual bool PeerConnectionFactoryCreated() OVERRIDE; | 155 virtual bool PeerConnectionFactoryCreated() OVERRIDE; |
154 | 156 |
155 virtual scoped_refptr<WebRtcAudioCapturer> MaybeCreateAudioCapturer( | 157 virtual scoped_refptr<WebRtcAudioCapturer> MaybeCreateAudioCapturer( |
156 int render_view_id, const StreamDeviceInfo& device_info) OVERRIDE; | 158 int render_view_id, const StreamDeviceInfo& device_info) OVERRIDE; |
157 | 159 |
158 MockAudioSource* last_audio_source() { return last_audio_source_.get(); } | 160 MockAudioSource* last_audio_source() { return last_audio_source_.get(); } |
159 MockVideoSource* last_video_source() { return last_video_source_.get(); } | 161 MockVideoSource* last_video_source() { return last_video_source_.get(); } |
160 | 162 |
161 private: | 163 private: |
162 bool mock_pc_factory_created_; | 164 bool mock_pc_factory_created_; |
163 scoped_refptr <MockAudioSource> last_audio_source_; | 165 scoped_refptr <MockAudioSource> last_audio_source_; |
164 scoped_refptr <MockVideoSource> last_video_source_; | 166 scoped_refptr <MockVideoSource> last_video_source_; |
165 | 167 |
166 DISALLOW_COPY_AND_ASSIGN(MockMediaStreamDependencyFactory); | 168 DISALLOW_COPY_AND_ASSIGN(MockMediaStreamDependencyFactory); |
167 }; | 169 }; |
168 | 170 |
169 } // namespace content | 171 } // namespace content |
170 | 172 |
171 #endif // CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_DEPENDENCY_FACTORY_H_ | 173 #endif // CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_DEPENDENCY_FACTORY_H_ |
OLD | NEW |