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

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

Issue 272043003: Renamed MediaStreamDependencyFactory to PeerConnectionDependencyFactory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: media_stream_dependency_factory_unittest.cc Created 6 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 | Annotate | Revision Log
OLDNEW
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_WEBRTC_MOCK_PEER_CONNECTION_DEPENDENCY_FACTORY_H_
6 #define CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_DEPENDENCY_FACTORY_H_ 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_MOCK_PEER_CONNECTION_DEPENDENCY_FACTORY_H_
7 7
8 #include <set>
8 #include <string> 9 #include <string>
9 #include <vector> 10 #include <vector>
10 11
11 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
12 #include "content/renderer/media/media_stream_dependency_factory.h" 13 #include "content/renderer/media/webrtc/peer_connection_dependency_factory.h"
13 #include "third_party/libjingle/source/talk/app/webrtc/mediaconstraintsinterface .h" 14 #include "third_party/libjingle/source/talk/app/webrtc/mediaconstraintsinterface .h"
14 #include "third_party/libjingle/source/talk/media/base/videorenderer.h" 15 #include "third_party/libjingle/source/talk/media/base/videorenderer.h"
15 16
16 namespace content { 17 namespace content {
17 18
18 class WebAudioCapturerSource; 19 class WebAudioCapturerSource;
19 20
20 class MockVideoRenderer : public cricket::VideoRenderer { 21 class MockVideoRenderer : public cricket::VideoRenderer {
21 public: 22 public:
22 MockVideoRenderer(); 23 MockVideoRenderer();
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 160
160 std::string label_; 161 std::string label_;
161 webrtc::AudioTrackVector audio_track_vector_; 162 webrtc::AudioTrackVector audio_track_vector_;
162 webrtc::VideoTrackVector video_track_vector_; 163 webrtc::VideoTrackVector video_track_vector_;
163 164
164 typedef std::set<webrtc::ObserverInterface*> ObserverSet; 165 typedef std::set<webrtc::ObserverInterface*> ObserverSet;
165 ObserverSet observers_; 166 ObserverSet observers_;
166 }; 167 };
167 168
168 // A mock factory for creating different objects for 169 // A mock factory for creating different objects for
169 // RTC MediaStreams and PeerConnections. 170 // RTC PeerConnections.
170 class MockMediaStreamDependencyFactory : public MediaStreamDependencyFactory { 171 class MockPeerConnectionDependencyFactory
172 : public PeerConnectionDependencyFactory {
171 public: 173 public:
172 MockMediaStreamDependencyFactory(); 174 MockPeerConnectionDependencyFactory();
173 virtual ~MockMediaStreamDependencyFactory(); 175 virtual ~MockPeerConnectionDependencyFactory();
174 176
175 virtual scoped_refptr<webrtc::PeerConnectionInterface> CreatePeerConnection( 177 virtual scoped_refptr<webrtc::PeerConnectionInterface> CreatePeerConnection(
176 const webrtc::PeerConnectionInterface::IceServers& ice_servers, 178 const webrtc::PeerConnectionInterface::IceServers& ice_servers,
177 const webrtc::MediaConstraintsInterface* constraints, 179 const webrtc::MediaConstraintsInterface* constraints,
178 blink::WebFrame* frame, 180 blink::WebFrame* frame,
179 webrtc::PeerConnectionObserver* observer) OVERRIDE; 181 webrtc::PeerConnectionObserver* observer) OVERRIDE;
180 virtual scoped_refptr<webrtc::AudioSourceInterface> 182 virtual scoped_refptr<webrtc::AudioSourceInterface>
181 CreateLocalAudioSource( 183 CreateLocalAudioSource(
182 const webrtc::MediaConstraintsInterface* constraints) OVERRIDE; 184 const webrtc::MediaConstraintsInterface* constraints) OVERRIDE;
183 virtual WebRtcVideoCapturerAdapter* CreateVideoCapturer( 185 virtual WebRtcVideoCapturerAdapter* CreateVideoCapturer(
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 WebRtcLocalAudioTrack* audio_track) OVERRIDE; 219 WebRtcLocalAudioTrack* audio_track) OVERRIDE;
218 220
219 MockAudioSource* last_audio_source() { return last_audio_source_.get(); } 221 MockAudioSource* last_audio_source() { return last_audio_source_.get(); }
220 MockVideoSource* last_video_source() { return last_video_source_.get(); } 222 MockVideoSource* last_video_source() { return last_video_source_.get(); }
221 223
222 private: 224 private:
223 bool fail_to_create_next_audio_capturer_; 225 bool fail_to_create_next_audio_capturer_;
224 scoped_refptr <MockAudioSource> last_audio_source_; 226 scoped_refptr <MockAudioSource> last_audio_source_;
225 scoped_refptr <MockVideoSource> last_video_source_; 227 scoped_refptr <MockVideoSource> last_video_source_;
226 228
227 DISALLOW_COPY_AND_ASSIGN(MockMediaStreamDependencyFactory); 229 DISALLOW_COPY_AND_ASSIGN(MockPeerConnectionDependencyFactory);
228 }; 230 };
229 231
230 } // namespace content 232 } // namespace content
231 233
232 #endif // CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_DEPENDENCY_FACTORY_H_ 234 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_MOCK_PEER_CONNECTION_DEPENDENCY_FACTORY _H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698