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

Side by Side Diff: content/renderer/media/mock_media_stream_dependency_factory.h

Issue 12207107: Update libjingle 273:277. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 10 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_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
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "content/renderer/media/media_stream_dependency_factory.h" 12 #include "content/renderer/media/media_stream_dependency_factory.h"
13 13
14 namespace content { 14 namespace content {
15 15
16 class MockVideoSource : public webrtc::VideoSourceInterface { 16 class MockVideoSource : public webrtc::VideoSourceInterface {
17 public: 17 public:
18 MockVideoSource(); 18 MockVideoSource();
19 19
20 virtual void RegisterObserver(webrtc::ObserverInterface* observer) OVERRIDE; 20 virtual void RegisterObserver(webrtc::ObserverInterface* observer) OVERRIDE;
21 virtual void UnregisterObserver(webrtc::ObserverInterface* observer) OVERRIDE; 21 virtual void UnregisterObserver(webrtc::ObserverInterface* observer) OVERRIDE;
22 virtual MediaSourceInterface::SourceState state() const OVERRIDE; 22 virtual MediaSourceInterface::SourceState state() const OVERRIDE;
23 virtual cricket::VideoCapturer* GetVideoCapturer() OVERRIDE; 23 virtual cricket::VideoCapturer* GetVideoCapturer() OVERRIDE;
24 virtual void AddSink(cricket::VideoRenderer* output) OVERRIDE; 24 virtual void AddSink(cricket::VideoRenderer* output) OVERRIDE;
25 virtual void RemoveSink(cricket::VideoRenderer* output) OVERRIDE; 25 virtual void RemoveSink(cricket::VideoRenderer* output) OVERRIDE;
26 virtual const cricket::VideoOptions* options() const OVERRIDE;
26 27
27 // Changes the state of the source to live and notifies the observer. 28 // Changes the state of the source to live and notifies the observer.
28 void SetLive(); 29 void SetLive();
29 // Changes the state of the source to ended and notifies the observer. 30 // Changes the state of the source to ended and notifies the observer.
30 void SetEnded(); 31 void SetEnded();
31 32
32 protected: 33 protected:
33 virtual ~MockVideoSource(); 34 virtual ~MockVideoSource();
34 35
35 private: 36 private:
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 virtual scoped_refptr<webrtc::LocalMediaStreamInterface> 148 virtual scoped_refptr<webrtc::LocalMediaStreamInterface>
148 CreateLocalMediaStream(const std::string& label) OVERRIDE; 149 CreateLocalMediaStream(const std::string& label) OVERRIDE;
149 virtual scoped_refptr<webrtc::VideoTrackInterface> 150 virtual scoped_refptr<webrtc::VideoTrackInterface>
150 CreateLocalVideoTrack(const std::string& id, 151 CreateLocalVideoTrack(const std::string& id,
151 webrtc::VideoSourceInterface* source) OVERRIDE; 152 webrtc::VideoSourceInterface* source) OVERRIDE;
152 virtual scoped_refptr<webrtc::LocalAudioTrackInterface> 153 virtual scoped_refptr<webrtc::LocalAudioTrackInterface>
153 CreateLocalAudioTrack(const std::string& id, 154 CreateLocalAudioTrack(const std::string& id,
154 webrtc::AudioSourceInterface* source) OVERRIDE; 155 webrtc::AudioSourceInterface* source) OVERRIDE;
155 virtual webrtc::SessionDescriptionInterface* CreateSessionDescription( 156 virtual webrtc::SessionDescriptionInterface* CreateSessionDescription(
156 const std::string& type, 157 const std::string& type,
157 const std::string& sdp) OVERRIDE; 158 const std::string& sdp,
159 webrtc::SdpParseError* error) OVERRIDE;
158 virtual webrtc::IceCandidateInterface* CreateIceCandidate( 160 virtual webrtc::IceCandidateInterface* CreateIceCandidate(
159 const std::string& sdp_mid, 161 const std::string& sdp_mid,
160 int sdp_mline_index, 162 int sdp_mline_index,
161 const std::string& sdp) OVERRIDE; 163 const std::string& sdp) OVERRIDE;
162 164
163 virtual bool EnsurePeerConnectionFactory() OVERRIDE; 165 virtual bool EnsurePeerConnectionFactory() OVERRIDE;
164 virtual bool PeerConnectionFactoryCreated() OVERRIDE; 166 virtual bool PeerConnectionFactoryCreated() OVERRIDE;
165 167
166 MockAudioSource* last_audio_source() { return last_audio_source_; } 168 MockAudioSource* last_audio_source() { return last_audio_source_; }
167 MockVideoSource* last_video_source() { return last_video_source_; } 169 MockVideoSource* last_video_source() { return last_video_source_; }
168 170
169 private: 171 private:
170 bool mock_pc_factory_created_; 172 bool mock_pc_factory_created_;
171 scoped_refptr <MockAudioSource> last_audio_source_; 173 scoped_refptr <MockAudioSource> last_audio_source_;
172 scoped_refptr <MockVideoSource> last_video_source_; 174 scoped_refptr <MockVideoSource> last_video_source_;
173 175
174 DISALLOW_COPY_AND_ASSIGN(MockMediaStreamDependencyFactory); 176 DISALLOW_COPY_AND_ASSIGN(MockMediaStreamDependencyFactory);
175 }; 177 };
176 178
177 } // namespace content 179 } // namespace content
178 180
179 #endif // CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_DEPENDENCY_FACTORY_H_ 181 #endif // CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_DEPENDENCY_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698