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> |
| 9 |
8 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
9 #include "content/renderer/media/media_stream_dependency_factory.h" | 11 #include "content/renderer/media/media_stream_dependency_factory.h" |
10 | 12 |
11 // A mock factory for creating different objects for MediaStreamImpl. | 13 // A mock factory for creating different objects for MediaStreamImpl. |
12 class MockMediaStreamDependencyFactory : public MediaStreamDependencyFactory { | 14 class MockMediaStreamDependencyFactory : public MediaStreamDependencyFactory { |
13 public: | 15 public: |
14 MockMediaStreamDependencyFactory(); | 16 MockMediaStreamDependencyFactory(); |
15 virtual ~MockMediaStreamDependencyFactory(); | 17 virtual ~MockMediaStreamDependencyFactory(); |
16 | 18 |
17 virtual cricket::WebRtcMediaEngine* CreateWebRtcMediaEngine() OVERRIDE; | |
18 virtual bool CreatePeerConnectionFactory( | 19 virtual bool CreatePeerConnectionFactory( |
19 cricket::MediaEngineInterface* media_engine, | 20 talk_base::Thread* worker_thread, |
20 talk_base::Thread* worker_thread) OVERRIDE; | 21 talk_base::Thread* signaling_thread, |
21 virtual void DeletePeerConnectionFactory() OVERRIDE; | |
22 virtual bool PeerConnectionFactoryCreated() OVERRIDE; | |
23 virtual cricket::PortAllocator* CreatePortAllocator( | |
24 content::P2PSocketDispatcher* socket_dispatcher, | 22 content::P2PSocketDispatcher* socket_dispatcher, |
25 talk_base::NetworkManager* network_manager, | 23 talk_base::NetworkManager* network_manager, |
26 talk_base::PacketSocketFactory* socket_factory, | 24 talk_base::PacketSocketFactory* socket_factory) OVERRIDE; |
27 const webkit_glue::P2PTransport::Config& config) OVERRIDE; | 25 virtual void ReleasePeerConnectionFactory() OVERRIDE; |
28 virtual webrtc::PeerConnection* CreatePeerConnection( | 26 virtual bool PeerConnectionFactoryCreated() OVERRIDE; |
29 cricket::PortAllocator* port_allocator, | 27 virtual talk_base::scoped_refptr<webrtc::PeerConnectionInterface> |
30 talk_base::Thread* signaling_thread) OVERRIDE; | 28 CreatePeerConnection( |
| 29 const std::string& config, |
| 30 webrtc::PeerConnectionObserver* observer) OVERRIDE; |
| 31 virtual talk_base::scoped_refptr<webrtc::LocalMediaStreamInterface> |
| 32 CreateLocalMediaStream(const std::string& label) OVERRIDE; |
| 33 virtual talk_base::scoped_refptr<webrtc::LocalVideoTrackInterface> |
| 34 CreateLocalVideoTrack( |
| 35 const std::string& label, |
| 36 cricket::VideoCapturer* video_device) OVERRIDE; |
| 37 virtual talk_base::scoped_refptr<webrtc::LocalAudioTrackInterface> |
| 38 CreateLocalAudioTrack( |
| 39 const std::string& label, |
| 40 webrtc::AudioDeviceModule* audio_device) OVERRIDE; |
31 | 41 |
32 private: | 42 private: |
33 bool mock_pc_factory_created_; | 43 bool mock_pc_factory_created_; |
34 scoped_ptr<cricket::MediaEngineInterface> media_engine_; | |
35 | 44 |
36 DISALLOW_COPY_AND_ASSIGN(MockMediaStreamDependencyFactory); | 45 DISALLOW_COPY_AND_ASSIGN(MockMediaStreamDependencyFactory); |
37 }; | 46 }; |
38 | 47 |
39 #endif // CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_DEPENDENCY_FACTORY_H_ | 48 #endif // CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_DEPENDENCY_FACTORY_H_ |
OLD | NEW |