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_peer_connection_impl.h" | 5 #include "content/renderer/media/mock_peer_connection_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 } | 260 } |
261 | 261 |
262 void MockPeerConnectionImpl::SetRemoteDescriptionWorker( | 262 void MockPeerConnectionImpl::SetRemoteDescriptionWorker( |
263 SetSessionDescriptionObserver* observer, | 263 SetSessionDescriptionObserver* observer, |
264 SessionDescriptionInterface* desc) { | 264 SessionDescriptionInterface* desc) { |
265 desc->ToString(&description_sdp_); | 265 desc->ToString(&description_sdp_); |
266 remote_desc_.reset(desc); | 266 remote_desc_.reset(desc); |
267 } | 267 } |
268 | 268 |
269 bool MockPeerConnectionImpl::SetConfiguration( | 269 bool MockPeerConnectionImpl::SetConfiguration( |
270 const RTCConfiguration& configuration) { | 270 const RTCConfiguration& configuration, |
271 return true; | 271 webrtc::RTCError* error) { |
| 272 if (setconfiguration_error_type_ == webrtc::RTCErrorType::NONE) { |
| 273 return true; |
| 274 } |
| 275 error->set_type(setconfiguration_error_type_); |
| 276 return false; |
272 } | 277 } |
273 | 278 |
274 bool MockPeerConnectionImpl::AddIceCandidate( | 279 bool MockPeerConnectionImpl::AddIceCandidate( |
275 const IceCandidateInterface* candidate) { | 280 const IceCandidateInterface* candidate) { |
276 sdp_mid_ = candidate->sdp_mid(); | 281 sdp_mid_ = candidate->sdp_mid(); |
277 sdp_mline_index_ = candidate->sdp_mline_index(); | 282 sdp_mline_index_ = candidate->sdp_mline_index(); |
278 return candidate->ToString(&ice_sdp_); | 283 return candidate->ToString(&ice_sdp_); |
279 } | 284 } |
280 | 285 |
281 void MockPeerConnectionImpl::RegisterUMAObserver( | 286 void MockPeerConnectionImpl::RegisterUMAObserver( |
282 webrtc::UMAObserver* observer) { | 287 webrtc::UMAObserver* observer) { |
283 NOTIMPLEMENTED(); | 288 NOTIMPLEMENTED(); |
284 } | 289 } |
285 | 290 |
286 } // namespace content | 291 } // namespace content |
OLD | NEW |