| 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" | |
| 6 #include "content/renderer/media/mock_peer_connection_impl.h" | 5 #include "content/renderer/media/mock_peer_connection_impl.h" |
| 7 | 6 |
| 8 #include <vector> | 7 #include <vector> |
| 9 | 8 |
| 10 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "content/renderer/media/webrtc/mock_peer_connection_dependency_factory.
h" |
| 11 | 11 |
| 12 using testing::_; | 12 using testing::_; |
| 13 using webrtc::AudioTrackInterface; | 13 using webrtc::AudioTrackInterface; |
| 14 using webrtc::CreateSessionDescriptionObserver; | 14 using webrtc::CreateSessionDescriptionObserver; |
| 15 using webrtc::DtmfSenderInterface; | 15 using webrtc::DtmfSenderInterface; |
| 16 using webrtc::DtmfSenderObserverInterface; | 16 using webrtc::DtmfSenderObserverInterface; |
| 17 using webrtc::IceCandidateInterface; | 17 using webrtc::IceCandidateInterface; |
| 18 using webrtc::MediaConstraintsInterface; | 18 using webrtc::MediaConstraintsInterface; |
| 19 using webrtc::MediaStreamInterface; | 19 using webrtc::MediaStreamInterface; |
| 20 using webrtc::PeerConnectionInterface; | 20 using webrtc::PeerConnectionInterface; |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 DtmfSenderObserverInterface* observer_; | 198 DtmfSenderObserverInterface* observer_; |
| 199 std::string tones_; | 199 std::string tones_; |
| 200 int duration_; | 200 int duration_; |
| 201 int inter_tone_gap_; | 201 int inter_tone_gap_; |
| 202 }; | 202 }; |
| 203 | 203 |
| 204 const char MockPeerConnectionImpl::kDummyOffer[] = "dummy offer"; | 204 const char MockPeerConnectionImpl::kDummyOffer[] = "dummy offer"; |
| 205 const char MockPeerConnectionImpl::kDummyAnswer[] = "dummy answer"; | 205 const char MockPeerConnectionImpl::kDummyAnswer[] = "dummy answer"; |
| 206 | 206 |
| 207 MockPeerConnectionImpl::MockPeerConnectionImpl( | 207 MockPeerConnectionImpl::MockPeerConnectionImpl( |
| 208 MockMediaStreamDependencyFactory* factory) | 208 MockPeerConnectionDependencyFactory* factory) |
| 209 : dependency_factory_(factory), | 209 : dependency_factory_(factory), |
| 210 local_streams_(new talk_base::RefCountedObject<MockStreamCollection>), | 210 local_streams_(new talk_base::RefCountedObject<MockStreamCollection>), |
| 211 remote_streams_(new talk_base::RefCountedObject<MockStreamCollection>), | 211 remote_streams_(new talk_base::RefCountedObject<MockStreamCollection>), |
| 212 hint_audio_(false), | 212 hint_audio_(false), |
| 213 hint_video_(false), | 213 hint_video_(false), |
| 214 getstats_result_(true), | 214 getstats_result_(true), |
| 215 sdp_mline_index_(-1) { | 215 sdp_mline_index_(-1) { |
| 216 ON_CALL(*this, SetLocalDescription(_, _)).WillByDefault(testing::Invoke( | 216 ON_CALL(*this, SetLocalDescription(_, _)).WillByDefault(testing::Invoke( |
| 217 this, &MockPeerConnectionImpl::SetLocalDescriptionWorker)); | 217 this, &MockPeerConnectionImpl::SetLocalDescriptionWorker)); |
| 218 ON_CALL(*this, SetRemoteDescription(_, _)).WillByDefault(testing::Invoke( | 218 ON_CALL(*this, SetRemoteDescription(_, _)).WillByDefault(testing::Invoke( |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 sdp_mline_index_ = candidate->sdp_mline_index(); | 354 sdp_mline_index_ = candidate->sdp_mline_index(); |
| 355 return candidate->ToString(&ice_sdp_); | 355 return candidate->ToString(&ice_sdp_); |
| 356 } | 356 } |
| 357 | 357 |
| 358 void MockPeerConnectionImpl::RegisterUMAObserver( | 358 void MockPeerConnectionImpl::RegisterUMAObserver( |
| 359 webrtc::UMAObserver* observer) { | 359 webrtc::UMAObserver* observer) { |
| 360 NOTIMPLEMENTED(); | 360 NOTIMPLEMENTED(); |
| 361 } | 361 } |
| 362 | 362 |
| 363 } // namespace content | 363 } // namespace content |
| OLD | NEW |