| OLD | NEW |
| 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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 sink_(NULL) {} | 184 sink_(NULL) {} |
| 185 | 185 |
| 186 MockWebRtcVideoTrack::~MockWebRtcVideoTrack() {} | 186 MockWebRtcVideoTrack::~MockWebRtcVideoTrack() {} |
| 187 | 187 |
| 188 scoped_refptr<MockWebRtcVideoTrack> MockWebRtcVideoTrack::Create( | 188 scoped_refptr<MockWebRtcVideoTrack> MockWebRtcVideoTrack::Create( |
| 189 const std::string& id) { | 189 const std::string& id) { |
| 190 return new rtc::RefCountedObject<MockWebRtcVideoTrack>(id, nullptr); | 190 return new rtc::RefCountedObject<MockWebRtcVideoTrack>(id, nullptr); |
| 191 } | 191 } |
| 192 | 192 |
| 193 void MockWebRtcVideoTrack::AddOrUpdateSink( | 193 void MockWebRtcVideoTrack::AddOrUpdateSink( |
| 194 rtc::VideoSinkInterface<cricket::VideoFrame>* sink, | 194 rtc::VideoSinkInterface<webrtc::VideoFrame>* sink, |
| 195 const rtc::VideoSinkWants& wants) { | 195 const rtc::VideoSinkWants& wants) { |
| 196 DCHECK(!sink_); | 196 DCHECK(!sink_); |
| 197 sink_ = sink; | 197 sink_ = sink; |
| 198 } | 198 } |
| 199 | 199 |
| 200 void MockWebRtcVideoTrack::RemoveSink( | 200 void MockWebRtcVideoTrack::RemoveSink( |
| 201 rtc::VideoSinkInterface<cricket::VideoFrame>* sink) { | 201 rtc::VideoSinkInterface<webrtc::VideoFrame>* sink) { |
| 202 DCHECK(sink_ == sink); | 202 DCHECK(sink_ == sink); |
| 203 sink_ = NULL; | 203 sink_ = NULL; |
| 204 } | 204 } |
| 205 | 205 |
| 206 VideoTrackSourceInterface* MockWebRtcVideoTrack::GetSource() const { | 206 VideoTrackSourceInterface* MockWebRtcVideoTrack::GetSource() const { |
| 207 return source_.get(); | 207 return source_.get(); |
| 208 } | 208 } |
| 209 | 209 |
| 210 std::string MockWebRtcVideoTrack::kind() const { | 210 std::string MockWebRtcVideoTrack::kind() const { |
| 211 return kVideoKind; | 211 return kVideoKind; |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 const std::string& sdp) { | 370 const std::string& sdp) { |
| 371 return new MockIceCandidate(sdp_mid, sdp_mline_index, sdp); | 371 return new MockIceCandidate(sdp_mid, sdp_mline_index, sdp); |
| 372 } | 372 } |
| 373 | 373 |
| 374 scoped_refptr<base::SingleThreadTaskRunner> | 374 scoped_refptr<base::SingleThreadTaskRunner> |
| 375 MockPeerConnectionDependencyFactory::GetWebRtcSignalingThread() const { | 375 MockPeerConnectionDependencyFactory::GetWebRtcSignalingThread() const { |
| 376 return signaling_thread_.task_runner(); | 376 return signaling_thread_.task_runner(); |
| 377 } | 377 } |
| 378 | 378 |
| 379 } // namespace content | 379 } // namespace content |
| OLD | NEW |