| 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_PEER_CONNECTION_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_MOCK_PEER_CONNECTION_IMPL_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_MOCK_PEER_CONNECTION_IMPL_H_ | 6 #define CONTENT_RENDERER_MEDIA_MOCK_PEER_CONNECTION_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 virtual void RemoveStream( | 33 virtual void RemoveStream( |
| 34 webrtc::MediaStreamInterface* local_stream) OVERRIDE; | 34 webrtc::MediaStreamInterface* local_stream) OVERRIDE; |
| 35 virtual talk_base::scoped_refptr<webrtc::DtmfSenderInterface> | 35 virtual talk_base::scoped_refptr<webrtc::DtmfSenderInterface> |
| 36 CreateDtmfSender(webrtc::AudioTrackInterface* track) OVERRIDE; | 36 CreateDtmfSender(webrtc::AudioTrackInterface* track) OVERRIDE; |
| 37 virtual talk_base::scoped_refptr<webrtc::DataChannelInterface> | 37 virtual talk_base::scoped_refptr<webrtc::DataChannelInterface> |
| 38 CreateDataChannel(const std::string& label, | 38 CreateDataChannel(const std::string& label, |
| 39 const webrtc::DataChannelInit* config) OVERRIDE; | 39 const webrtc::DataChannelInit* config) OVERRIDE; |
| 40 | 40 |
| 41 virtual bool GetStats(webrtc::StatsObserver* observer, | 41 virtual bool GetStats(webrtc::StatsObserver* observer, |
| 42 webrtc::MediaStreamTrackInterface* track) OVERRIDE; | 42 webrtc::MediaStreamTrackInterface* track) OVERRIDE; |
| 43 virtual ReadyState ready_state() OVERRIDE; | 43 virtual ReadyState ready_state() OVERRIDE { |
| 44 virtual SignalingState signaling_state() OVERRIDE; | 44 NOTIMPLEMENTED(); |
| 45 return PeerConnectionInterface::kStable; |
| 46 } |
| 47 virtual SignalingState signaling_state() OVERRIDE { |
| 48 NOTIMPLEMENTED(); |
| 49 return PeerConnectionInterface::kStable; |
| 50 } |
| 51 virtual IceState ice_state() OVERRIDE { |
| 52 NOTIMPLEMENTED(); |
| 53 return PeerConnectionInterface::kIceNew; |
| 54 } |
| 55 virtual IceConnectionState ice_connection_state() OVERRIDE { |
| 56 NOTIMPLEMENTED(); |
| 57 return PeerConnectionInterface::kIceConnectionNew; |
| 58 } |
| 59 virtual IceGatheringState ice_gathering_state() OVERRIDE { |
| 60 NOTIMPLEMENTED(); |
| 61 return PeerConnectionInterface::kIceGatheringNew; |
| 62 } |
| 45 | 63 |
| 46 virtual const webrtc::SessionDescriptionInterface* local_description() | 64 virtual const webrtc::SessionDescriptionInterface* local_description() |
| 47 const OVERRIDE; | 65 const OVERRIDE; |
| 48 virtual const webrtc::SessionDescriptionInterface* remote_description() | 66 virtual const webrtc::SessionDescriptionInterface* remote_description() |
| 49 const OVERRIDE; | 67 const OVERRIDE; |
| 50 | 68 |
| 51 // JSEP01 APIs | 69 // JSEP01 APIs |
| 52 virtual void CreateOffer( | 70 virtual void CreateOffer( |
| 53 webrtc::CreateSessionDescriptionObserver* observer, | 71 webrtc::CreateSessionDescriptionObserver* observer, |
| 54 const webrtc::MediaConstraintsInterface* constraints) OVERRIDE; | 72 const webrtc::MediaConstraintsInterface* constraints) OVERRIDE; |
| 55 virtual void CreateAnswer( | 73 virtual void CreateAnswer( |
| 56 webrtc::CreateSessionDescriptionObserver* observer, | 74 webrtc::CreateSessionDescriptionObserver* observer, |
| 57 const webrtc::MediaConstraintsInterface* constraints) OVERRIDE; | 75 const webrtc::MediaConstraintsInterface* constraints) OVERRIDE; |
| 58 MOCK_METHOD2(SetLocalDescription, | 76 MOCK_METHOD2(SetLocalDescription, |
| 59 void(webrtc::SetSessionDescriptionObserver* observer, | 77 void(webrtc::SetSessionDescriptionObserver* observer, |
| 60 webrtc::SessionDescriptionInterface* desc)); | 78 webrtc::SessionDescriptionInterface* desc)); |
| 61 void SetLocalDescriptionWorker( | 79 void SetLocalDescriptionWorker( |
| 62 webrtc::SetSessionDescriptionObserver* observer, | 80 webrtc::SetSessionDescriptionObserver* observer, |
| 63 webrtc::SessionDescriptionInterface* desc) ; | 81 webrtc::SessionDescriptionInterface* desc) ; |
| 64 virtual void SetRemoteDescription( | 82 virtual void SetRemoteDescription( |
| 65 webrtc::SetSessionDescriptionObserver* observer, | 83 webrtc::SetSessionDescriptionObserver* observer, |
| 66 webrtc::SessionDescriptionInterface* desc) OVERRIDE; | 84 webrtc::SessionDescriptionInterface* desc) OVERRIDE; |
| 67 virtual bool UpdateIce( | 85 virtual bool UpdateIce( |
| 68 const IceServers& configuration, | 86 const IceServers& configuration, |
| 69 const webrtc::MediaConstraintsInterface* constraints) OVERRIDE; | 87 const webrtc::MediaConstraintsInterface* constraints) OVERRIDE; |
| 70 virtual bool AddIceCandidate( | 88 virtual bool AddIceCandidate( |
| 71 const webrtc::IceCandidateInterface* candidate) OVERRIDE; | 89 const webrtc::IceCandidateInterface* candidate) OVERRIDE; |
| 72 virtual IceState ice_state() OVERRIDE; | |
| 73 virtual IceConnectionState ice_connection_state() OVERRIDE; | |
| 74 virtual IceGatheringState ice_gathering_state() OVERRIDE; | |
| 75 | 90 |
| 76 void AddRemoteStream(webrtc::MediaStreamInterface* stream); | 91 void AddRemoteStream(webrtc::MediaStreamInterface* stream); |
| 77 void SetSignalingState(SignalingState state) { signaling_state_ = state; } | |
| 78 void SetIceState(IceState state) { ice_state_ = state; } | |
| 79 | 92 |
| 80 const std::string& stream_label() const { return stream_label_; } | 93 const std::string& stream_label() const { return stream_label_; } |
| 81 bool hint_audio() const { return hint_audio_; } | 94 bool hint_audio() const { return hint_audio_; } |
| 82 bool hint_video() const { return hint_video_; } | 95 bool hint_video() const { return hint_video_; } |
| 83 const std::string& description_sdp() const { return description_sdp_; } | 96 const std::string& description_sdp() const { return description_sdp_; } |
| 84 const std::string& sdp_mid() const { return sdp_mid_; } | 97 const std::string& sdp_mid() const { return sdp_mid_; } |
| 85 int sdp_mline_index() const { return sdp_mline_index_; } | 98 int sdp_mline_index() const { return sdp_mline_index_; } |
| 86 const std::string& ice_sdp() const { return ice_sdp_; } | 99 const std::string& ice_sdp() const { return ice_sdp_; } |
| 87 webrtc::SessionDescriptionInterface* created_session_description() const { | 100 webrtc::SessionDescriptionInterface* created_session_description() const { |
| 88 return created_sessiondescription_.get(); | 101 return created_sessiondescription_.get(); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 102 talk_base::scoped_refptr<MockStreamCollection> remote_streams_; | 115 talk_base::scoped_refptr<MockStreamCollection> remote_streams_; |
| 103 scoped_ptr<webrtc::SessionDescriptionInterface> local_desc_; | 116 scoped_ptr<webrtc::SessionDescriptionInterface> local_desc_; |
| 104 scoped_ptr<webrtc::SessionDescriptionInterface> remote_desc_; | 117 scoped_ptr<webrtc::SessionDescriptionInterface> remote_desc_; |
| 105 scoped_ptr<webrtc::SessionDescriptionInterface> created_sessiondescription_; | 118 scoped_ptr<webrtc::SessionDescriptionInterface> created_sessiondescription_; |
| 106 bool hint_audio_; | 119 bool hint_audio_; |
| 107 bool hint_video_; | 120 bool hint_video_; |
| 108 std::string description_sdp_; | 121 std::string description_sdp_; |
| 109 std::string sdp_mid_; | 122 std::string sdp_mid_; |
| 110 int sdp_mline_index_; | 123 int sdp_mline_index_; |
| 111 std::string ice_sdp_; | 124 std::string ice_sdp_; |
| 112 SignalingState signaling_state_; | |
| 113 IceState ice_state_; | |
| 114 | 125 |
| 115 DISALLOW_COPY_AND_ASSIGN(MockPeerConnectionImpl); | 126 DISALLOW_COPY_AND_ASSIGN(MockPeerConnectionImpl); |
| 116 }; | 127 }; |
| 117 | 128 |
| 118 } // namespace content | 129 } // namespace content |
| 119 | 130 |
| 120 #endif // CONTENT_RENDERER_MEDIA_MOCK_PEER_CONNECTION_IMPL_H_ | 131 #endif // CONTENT_RENDERER_MEDIA_MOCK_PEER_CONNECTION_IMPL_H_ |
| OLD | NEW |