| 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 25 matching lines...) Expand all Loading... |
| 36 | 36 |
| 37 protected: | 37 protected: |
| 38 virtual ~MockLocalVideoTrack() {} | 38 virtual ~MockLocalVideoTrack() {} |
| 39 | 39 |
| 40 private: | 40 private: |
| 41 bool enabled_; | 41 bool enabled_; |
| 42 std::string label_; | 42 std::string label_; |
| 43 VideoRendererWrapperInterface* renderer_; | 43 VideoRendererWrapperInterface* renderer_; |
| 44 }; | 44 }; |
| 45 | 45 |
| 46 } // namespace webrtc | 46 } // namespace webrtc |
| 47 | 47 |
| 48 // A mock factory for creating different objects for MediaStreamImpl. | 48 // A mock factory for creating different objects for MediaStreamImpl. |
| 49 class MockMediaStreamDependencyFactory : public MediaStreamDependencyFactory { | 49 class MockMediaStreamDependencyFactory : public MediaStreamDependencyFactory { |
| 50 public: | 50 public: |
| 51 MockMediaStreamDependencyFactory(); | 51 MockMediaStreamDependencyFactory(); |
| 52 virtual ~MockMediaStreamDependencyFactory(); | 52 virtual ~MockMediaStreamDependencyFactory(); |
| 53 | 53 |
| 54 virtual bool CreatePeerConnectionFactory( | 54 virtual bool CreatePeerConnectionFactory( |
| 55 talk_base::Thread* worker_thread, | 55 talk_base::Thread* worker_thread, |
| 56 talk_base::Thread* signaling_thread, | 56 talk_base::Thread* signaling_thread, |
| 57 content::P2PSocketDispatcher* socket_dispatcher, | 57 content::P2PSocketDispatcher* socket_dispatcher, |
| 58 talk_base::NetworkManager* network_manager, | 58 talk_base::NetworkManager* network_manager, |
| 59 talk_base::PacketSocketFactory* socket_factory) OVERRIDE; | 59 talk_base::PacketSocketFactory* socket_factory) OVERRIDE; |
| 60 virtual void ReleasePeerConnectionFactory() OVERRIDE; | 60 virtual void ReleasePeerConnectionFactory() OVERRIDE; |
| 61 virtual bool PeerConnectionFactoryCreated() OVERRIDE; | 61 virtual bool PeerConnectionFactoryCreated() OVERRIDE; |
| 62 virtual talk_base::scoped_refptr<webrtc::PeerConnectionInterface> | 62 virtual talk_base::scoped_refptr<webrtc::PeerConnectionInterface> |
| 63 CreatePeerConnection( | 63 CreatePeerConnection( |
| 64 const std::string& config, | 64 const std::string& config, |
| 65 webrtc::PeerConnectionObserver* observer) OVERRIDE; | 65 webrtc::PeerConnectionObserver* observer) OVERRIDE; |
| 66 virtual talk_base::scoped_refptr<webrtc::PeerConnectionInterface> |
| 67 CreateRoapPeerConnection( |
| 68 const std::string& config, |
| 69 webrtc::PeerConnectionObserver* observer) OVERRIDE; |
| 66 virtual talk_base::scoped_refptr<webrtc::LocalMediaStreamInterface> | 70 virtual talk_base::scoped_refptr<webrtc::LocalMediaStreamInterface> |
| 67 CreateLocalMediaStream(const std::string& label) OVERRIDE; | 71 CreateLocalMediaStream(const std::string& label) OVERRIDE; |
| 68 virtual talk_base::scoped_refptr<webrtc::LocalVideoTrackInterface> | 72 virtual talk_base::scoped_refptr<webrtc::LocalVideoTrackInterface> |
| 69 CreateLocalVideoTrack( | 73 CreateLocalVideoTrack( |
| 70 const std::string& label, | 74 const std::string& label, |
| 71 cricket::VideoCapturer* video_device) OVERRIDE; | 75 cricket::VideoCapturer* video_device) OVERRIDE; |
| 72 virtual talk_base::scoped_refptr<webrtc::LocalAudioTrackInterface> | 76 virtual talk_base::scoped_refptr<webrtc::LocalAudioTrackInterface> |
| 73 CreateLocalAudioTrack( | 77 CreateLocalAudioTrack( |
| 74 const std::string& label, | 78 const std::string& label, |
| 75 webrtc::AudioDeviceModule* audio_device) OVERRIDE; | 79 webrtc::AudioDeviceModule* audio_device) OVERRIDE; |
| 76 | 80 |
| 77 private: | 81 private: |
| 78 bool mock_pc_factory_created_; | 82 bool mock_pc_factory_created_; |
| 79 | 83 |
| 80 DISALLOW_COPY_AND_ASSIGN(MockMediaStreamDependencyFactory); | 84 DISALLOW_COPY_AND_ASSIGN(MockMediaStreamDependencyFactory); |
| 81 }; | 85 }; |
| 82 | 86 |
| 83 #endif // CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_DEPENDENCY_FACTORY_H_ | 87 #endif // CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_DEPENDENCY_FACTORY_H_ |
| OLD | NEW |