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

Side by Side Diff: content/renderer/media/mock_media_stream_dependency_factory.cc

Issue 17948002: Update Linux to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 5 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 | Annotate | Revision Log
OLDNEW
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 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "content/renderer/media/mock_peer_connection_impl.h" 9 #include "content/renderer/media/mock_peer_connection_impl.h"
10 #include "content/renderer/media/webrtc_audio_capturer.h" 10 #include "content/renderer/media/webrtc_audio_capturer.h"
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 scoped_refptr<webrtc::VideoTrackInterface> 438 scoped_refptr<webrtc::VideoTrackInterface>
439 MockMediaStreamDependencyFactory::CreateLocalVideoTrack( 439 MockMediaStreamDependencyFactory::CreateLocalVideoTrack(
440 const std::string& id, 440 const std::string& id,
441 cricket::VideoCapturer* capturer) { 441 cricket::VideoCapturer* capturer) {
442 DCHECK(mock_pc_factory_created_); 442 DCHECK(mock_pc_factory_created_);
443 443
444 scoped_refptr<MockVideoSource> source = 444 scoped_refptr<MockVideoSource> source =
445 new talk_base::RefCountedObject<MockVideoSource>(); 445 new talk_base::RefCountedObject<MockVideoSource>();
446 source->SetVideoCapturer(capturer); 446 source->SetVideoCapturer(capturer);
447 447
448 return new talk_base::RefCountedObject<MockLocalVideoTrack>(id, source); 448 return new talk_base::RefCountedObject<MockLocalVideoTrack>(id, source.get());
449 } 449 }
450 450
451 scoped_refptr<webrtc::AudioTrackInterface> 451 scoped_refptr<webrtc::AudioTrackInterface>
452 MockMediaStreamDependencyFactory::CreateLocalAudioTrack( 452 MockMediaStreamDependencyFactory::CreateLocalAudioTrack(
453 const std::string& id, 453 const std::string& id,
454 webrtc::AudioSourceInterface* source) { 454 webrtc::AudioSourceInterface* source) {
455 DCHECK(mock_pc_factory_created_); 455 DCHECK(mock_pc_factory_created_);
456 scoped_refptr<WebRtcAudioCapturer> capturer( 456 scoped_refptr<WebRtcAudioCapturer> capturer(
457 WebRtcAudioCapturer::CreateCapturer()); 457 WebRtcAudioCapturer::CreateCapturer());
458 return WebRtcLocalAudioTrack::Create(id, capturer, source); 458 return WebRtcLocalAudioTrack::Create(id, capturer, source);
459 } 459 }
460 460
461 SessionDescriptionInterface* 461 SessionDescriptionInterface*
462 MockMediaStreamDependencyFactory::CreateSessionDescription( 462 MockMediaStreamDependencyFactory::CreateSessionDescription(
463 const std::string& type, 463 const std::string& type,
464 const std::string& sdp, 464 const std::string& sdp,
465 webrtc::SdpParseError* error) { 465 webrtc::SdpParseError* error) {
466 return new MockSessionDescription(type, sdp); 466 return new MockSessionDescription(type, sdp);
467 } 467 }
468 468
469 webrtc::IceCandidateInterface* 469 webrtc::IceCandidateInterface*
470 MockMediaStreamDependencyFactory::CreateIceCandidate( 470 MockMediaStreamDependencyFactory::CreateIceCandidate(
471 const std::string& sdp_mid, 471 const std::string& sdp_mid,
472 int sdp_mline_index, 472 int sdp_mline_index,
473 const std::string& sdp) { 473 const std::string& sdp) {
474 return new MockIceCandidate(sdp_mid, sdp_mline_index, sdp); 474 return new MockIceCandidate(sdp_mid, sdp_mline_index, sdp);
475 } 475 }
476 476
477 } // namespace content 477 } // namespace content
OLDNEW
« no previous file with comments | « content/child/webmessageportchannel_impl.cc ('k') | content/renderer/renderer_webkitplatformsupport_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698