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 #include "content/renderer/media/mock_media_stream_dependency_factory.h" | 5 #include "content/renderer/media/mock_media_stream_dependency_factory.h" |
6 #include "content/renderer/media/mock_peer_connection_impl.h" | 6 #include "content/renderer/media/mock_peer_connection_impl.h" |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 | 115 |
116 virtual void Close() OVERRIDE { | 116 virtual void Close() OVERRIDE { |
117 state_ = webrtc::DataChannelInterface::kClosing; | 117 state_ = webrtc::DataChannelInterface::kClosing; |
118 } | 118 } |
119 | 119 |
120 virtual bool Send(const webrtc::DataBuffer& buffer) OVERRIDE { | 120 virtual bool Send(const webrtc::DataBuffer& buffer) OVERRIDE { |
121 return state_ == webrtc::DataChannelInterface::kOpen; | 121 return state_ == webrtc::DataChannelInterface::kOpen; |
122 } | 122 } |
123 | 123 |
124 protected: | 124 protected: |
125 ~MockDataChannel() {} | 125 virtual ~MockDataChannel() {} |
126 | 126 |
127 private: | 127 private: |
128 std::string label_; | 128 std::string label_; |
129 bool reliable_; | 129 bool reliable_; |
130 webrtc::DataChannelInterface::DataState state_; | 130 webrtc::DataChannelInterface::DataState state_; |
131 }; | 131 }; |
132 | 132 |
133 class MockDtmfSender : public DtmfSenderInterface { | 133 class MockDtmfSender : public DtmfSenderInterface { |
134 public: | 134 public: |
135 explicit MockDtmfSender(AudioTrackInterface* track) | 135 explicit MockDtmfSender(AudioTrackInterface* track) |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 } | 312 } |
313 | 313 |
314 bool MockPeerConnectionImpl::AddIceCandidate( | 314 bool MockPeerConnectionImpl::AddIceCandidate( |
315 const IceCandidateInterface* candidate) { | 315 const IceCandidateInterface* candidate) { |
316 sdp_mid_ = candidate->sdp_mid(); | 316 sdp_mid_ = candidate->sdp_mid(); |
317 sdp_mline_index_ = candidate->sdp_mline_index(); | 317 sdp_mline_index_ = candidate->sdp_mline_index(); |
318 return candidate->ToString(&ice_sdp_); | 318 return candidate->ToString(&ice_sdp_); |
319 } | 319 } |
320 | 320 |
321 } // namespace content | 321 } // namespace content |
OLD | NEW |