OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_RENDERER_MEDIA_MOCK_PEER_CONNECTION_IMPL_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_MOCK_PEER_CONNECTION_IMPL_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "base/basictypes.h" |
| 11 #include "base/compiler_specific.h" |
| 12 #include "third_party/libjingle/source/talk/app/webrtc/peerconnection.h" |
| 13 |
| 14 namespace webrtc { |
| 15 |
| 16 class MockPeerConnectionImpl : public PeerConnection { |
| 17 public: |
| 18 MockPeerConnectionImpl(); |
| 19 virtual ~MockPeerConnectionImpl(); |
| 20 |
| 21 // PeerConnection implementation. |
| 22 virtual void RegisterObserver(PeerConnectionObserver* observer) OVERRIDE; |
| 23 virtual bool SignalingMessage(const std::string& msg) OVERRIDE; |
| 24 virtual bool AddStream(const std::string& stream_id, bool video) OVERRIDE; |
| 25 virtual bool RemoveStream(const std::string& stream_id) OVERRIDE; |
| 26 virtual bool Connect() OVERRIDE; |
| 27 virtual bool Close() OVERRIDE; |
| 28 virtual bool SetAudioDevice( |
| 29 const std::string& wave_in_device, |
| 30 const std::string& wave_out_device, int opts) OVERRIDE; |
| 31 virtual bool SetLocalVideoRenderer(cricket::VideoRenderer* renderer) OVERRIDE; |
| 32 virtual bool SetVideoRenderer( |
| 33 const std::string& stream_id, |
| 34 cricket::VideoRenderer* renderer) OVERRIDE; |
| 35 virtual bool SetVideoCapture(const std::string& cam_device) OVERRIDE; |
| 36 virtual ReadyState GetReadyState() OVERRIDE; |
| 37 |
| 38 PeerConnectionObserver* observer() const { return observer_; } |
| 39 const std::string& signaling_message() const { return signaling_message_; } |
| 40 const std::string& stream_id() const { return stream_id_; } |
| 41 bool video_stream() const { return video_stream_; } |
| 42 bool connected() const { return connected_; } |
| 43 bool video_capture_set() const { return video_capture_set_; } |
| 44 const std::string& video_renderer_stream_id() const { |
| 45 return video_renderer_stream_id_; |
| 46 } |
| 47 |
| 48 private: |
| 49 PeerConnectionObserver* observer_; |
| 50 std::string signaling_message_; |
| 51 std::string stream_id_; |
| 52 bool video_stream_; |
| 53 bool connected_; |
| 54 bool video_capture_set_; |
| 55 std::string video_renderer_stream_id_; |
| 56 |
| 57 DISALLOW_COPY_AND_ASSIGN(MockPeerConnectionImpl); |
| 58 }; |
| 59 |
| 60 } // namespace webrtc |
| 61 |
| 62 #endif // CONTENT_RENDERER_MEDIA_MOCK_PEER_CONNECTION_IMPL_H_ |
OLD | NEW |