Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1098)

Side by Side Diff: content/renderer/media/webrtc/mock_peer_connection_dependency_factory.cc

Issue 2619343003: Track SDP parse errors for SLD in chrome://webrtc-internals (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/webrtc/mock_peer_connection_dependency_factory. h" 5 #include "content/renderer/media/webrtc/mock_peer_connection_dependency_factory. h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 new rtc::RefCountedObject<MockWebRtcVideoTrack>( 353 new rtc::RefCountedObject<MockWebRtcVideoTrack>(
354 id, source)); 354 id, source));
355 return track; 355 return track;
356 } 356 }
357 357
358 SessionDescriptionInterface* 358 SessionDescriptionInterface*
359 MockPeerConnectionDependencyFactory::CreateSessionDescription( 359 MockPeerConnectionDependencyFactory::CreateSessionDescription(
360 const std::string& type, 360 const std::string& type,
361 const std::string& sdp, 361 const std::string& sdp,
362 webrtc::SdpParseError* error) { 362 webrtc::SdpParseError* error) {
363 if (fail_to_create_session_description_)
364 return nullptr;
363 return new MockSessionDescription(type, sdp); 365 return new MockSessionDescription(type, sdp);
364 } 366 }
365 367
366 webrtc::IceCandidateInterface* 368 webrtc::IceCandidateInterface*
367 MockPeerConnectionDependencyFactory::CreateIceCandidate( 369 MockPeerConnectionDependencyFactory::CreateIceCandidate(
368 const std::string& sdp_mid, 370 const std::string& sdp_mid,
369 int sdp_mline_index, 371 int sdp_mline_index,
370 const std::string& sdp) { 372 const std::string& sdp) {
371 return new MockIceCandidate(sdp_mid, sdp_mline_index, sdp); 373 return new MockIceCandidate(sdp_mid, sdp_mline_index, sdp);
372 } 374 }
373 375
374 scoped_refptr<base::SingleThreadTaskRunner> 376 scoped_refptr<base::SingleThreadTaskRunner>
375 MockPeerConnectionDependencyFactory::GetWebRtcSignalingThread() const { 377 MockPeerConnectionDependencyFactory::GetWebRtcSignalingThread() const {
376 return signaling_thread_.task_runner(); 378 return signaling_thread_.task_runner();
377 } 379 }
378 380
381 void MockPeerConnectionDependencyFactory::SetFailToCreateSessionDescription(
382 bool fail) {
383 fail_to_create_session_description_ = fail;
384 }
385
379 } // namespace content 386 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698