| 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/shell/renderer/test_runner/mock_webrtc_peer_connection_handler
.h" | 5 #include "content/shell/renderer/test_runner/mock_webrtc_peer_connection_handler
.h" |
| 6 | 6 |
| 7 #include "content/shell/renderer/test_runner/TestInterfaces.h" | 7 #include "content/shell/renderer/test_runner/TestInterfaces.h" |
| 8 #include "content/shell/renderer/test_runner/WebTestDelegate.h" | 8 #include "content/shell/renderer/test_runner/WebTestDelegate.h" |
| 9 #include "content/shell/renderer/test_runner/mock_constraints.h" | 9 #include "content/shell/renderer/test_runner/mock_constraints.h" |
| 10 #include "content/shell/renderer/test_runner/mock_webrtc_data_channel_handler.h" | 10 #include "content/shell/renderer/test_runner/mock_webrtc_data_channel_handler.h" |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 WebRTCSessionDescription session_description; | 180 WebRTCSessionDescription session_description; |
| 181 session_description.initialize("offer", "local"); | 181 session_description.initialize("offer", "local"); |
| 182 interfaces_->delegate()->postTask( | 182 interfaces_->delegate()->postTask( |
| 183 new RTCSessionDescriptionRequestSuccededTask( | 183 new RTCSessionDescriptionRequestSuccededTask( |
| 184 this, request, session_description)); | 184 this, request, session_description)); |
| 185 } else | 185 } else |
| 186 interfaces_->delegate()->postTask( | 186 interfaces_->delegate()->postTask( |
| 187 new RTCSessionDescriptionRequestFailedTask(this, request)); | 187 new RTCSessionDescriptionRequestFailedTask(this, request)); |
| 188 } | 188 } |
| 189 | 189 |
| 190 void MockWebRTCPeerConnectionHandler::createOffer( |
| 191 const WebRTCSessionDescriptionRequest& request, |
| 192 const blink::WebRTCOfferOptions& options) { |
| 193 interfaces_->delegate()->postTask( |
| 194 new RTCSessionDescriptionRequestFailedTask(this, request)); |
| 195 } |
| 196 |
| 190 void MockWebRTCPeerConnectionHandler::createAnswer( | 197 void MockWebRTCPeerConnectionHandler::createAnswer( |
| 191 const WebRTCSessionDescriptionRequest& request, | 198 const WebRTCSessionDescriptionRequest& request, |
| 192 const WebMediaConstraints& constraints) { | 199 const WebMediaConstraints& constraints) { |
| 193 if (!remote_description_.isNull()) { | 200 if (!remote_description_.isNull()) { |
| 194 WebRTCSessionDescription session_description; | 201 WebRTCSessionDescription session_description; |
| 195 session_description.initialize("answer", "local"); | 202 session_description.initialize("answer", "local"); |
| 196 interfaces_->delegate()->postTask( | 203 interfaces_->delegate()->postTask( |
| 197 new RTCSessionDescriptionRequestSuccededTask( | 204 new RTCSessionDescriptionRequestSuccededTask( |
| 198 this, request, session_description)); | 205 this, request, session_description)); |
| 199 } else | 206 } else |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 const WebMediaStreamTrack& track) { | 309 const WebMediaStreamTrack& track) { |
| 303 return new MockWebRTCDTMFSenderHandler(track, interfaces_->delegate()); | 310 return new MockWebRTCDTMFSenderHandler(track, interfaces_->delegate()); |
| 304 } | 311 } |
| 305 | 312 |
| 306 void MockWebRTCPeerConnectionHandler::stop() { | 313 void MockWebRTCPeerConnectionHandler::stop() { |
| 307 stopped_ = true; | 314 stopped_ = true; |
| 308 task_list_.revokeAll(); | 315 task_list_.revokeAll(); |
| 309 } | 316 } |
| 310 | 317 |
| 311 } // namespace content | 318 } // namespace content |
| OLD | NEW |