Index: content/renderer/media/mock_peer_connection_impl.cc |
diff --git a/content/renderer/media/mock_peer_connection_impl.cc b/content/renderer/media/mock_peer_connection_impl.cc |
index 365f18b8ae82b67192533b99d13ded8a01a37d95..4b68eb9074a089e7261d335d21a1002eee53a646 100644 |
--- a/content/renderer/media/mock_peer_connection_impl.cc |
+++ b/content/renderer/media/mock_peer_connection_impl.cc |
@@ -9,83 +9,56 @@ |
namespace webrtc { |
MockPeerConnectionImpl::MockPeerConnectionImpl() |
- : observer_(NULL), |
- video_stream_(false), |
- connected_(false), |
- video_capture_set_(false) { |
+ : stream_changes_committed_(false) { |
} |
MockPeerConnectionImpl::~MockPeerConnectionImpl() {} |
-void MockPeerConnectionImpl::RegisterObserver( |
- PeerConnectionObserver* observer) { |
- observer_ = observer; |
+void MockPeerConnectionImpl::ProcessSignalingMessage(const std::string& msg) { |
+ signaling_message_ = msg; |
} |
-bool MockPeerConnectionImpl::SignalingMessage( |
- const std::string& signaling_message) { |
- signaling_message_ = signaling_message; |
- return true; |
+bool MockPeerConnectionImpl::Send(const std::string& msg) { |
+ NOTIMPLEMENTED(); |
+ return false; |
} |
-bool MockPeerConnectionImpl::AddStream( |
- const std::string& stream_id, |
- bool video) { |
- stream_id_ = stream_id; |
- video_stream_ = video; |
- return true; |
+talk_base::scoped_refptr<StreamCollectionInterface> local_streams() { |
+ NOTIMPLEMENTED(); |
+ return NULL; |
} |
-bool MockPeerConnectionImpl::RemoveStream(const std::string& stream_id) { |
- stream_id_.clear(); |
- video_stream_ = false; |
- return true; |
+talk_base::scoped_refptr<StreamCollectionInterface> remote_streams() { |
+ NOTIMPLEMENTED(); |
+ return NULL; |
} |
-bool MockPeerConnectionImpl::Connect() { |
- connected_ = true; |
- return true; |
+void MockPeerConnectionImpl::AddStream(LocalMediaStreamInterface* stream) { |
+ stream_label_ = stream->label(); |
} |
-bool MockPeerConnectionImpl::Close() { |
- observer_ = NULL; |
- signaling_message_.clear(); |
- stream_id_.clear(); |
- video_stream_ = false; |
- connected_ = false; |
- video_capture_set_ = false; |
- return true; |
+void MockPeerConnectionImpl::RemoveStream(LocalMediaStreamInterface* stream) { |
+ stream_label_.clear(); |
} |
-bool MockPeerConnectionImpl::SetAudioDevice( |
- const std::string& wave_in_device, |
- const std::string& wave_out_device, |
- int opts) { |
- NOTIMPLEMENTED(); |
- return false; |
+void MockPeerConnectionImpl::CommitStreamChanges() { |
+ stream_changes_committed_ = true; |
} |
-bool MockPeerConnectionImpl::SetLocalVideoRenderer( |
- cricket::VideoRenderer* renderer) { |
- NOTIMPLEMENTED(); |
- return false; |
-} |
- |
-bool MockPeerConnectionImpl::SetVideoRenderer( |
- const std::string& stream_id, |
- cricket::VideoRenderer* renderer) { |
- video_renderer_stream_id_ = stream_id; |
- return true; |
+void MockPeerConnectionImpl::Close() { |
+ signaling_message_.clear(); |
+ stream_label_.clear(); |
+ stream_changes_committed_ = false; |
} |
-bool MockPeerConnectionImpl::SetVideoCapture(const std::string& cam_device) { |
- video_capture_set_ = true; |
- return true; |
+MockPeerConnectionImpl::ReadyState MockPeerConnectionImpl::ready_state() { |
+ NOTIMPLEMENTED(); |
+ return kNew; |
} |
-MockPeerConnectionImpl::ReadyState MockPeerConnectionImpl::GetReadyState() { |
+MockPeerConnectionImpl::SdpState MockPeerConnectionImpl::sdp_state() { |
NOTIMPLEMENTED(); |
- return NEW; |
+ return kSdpNew; |
} |
} // namespace webrtc |