OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/MockWebRTCPeerConnectionHandler.h" | 5 #include "content/shell/renderer/test_runner/MockWebRTCPeerConnectionHandler.h" |
6 | 6 |
7 #include "content/shell/renderer/test_runner/MockConstraints.h" | |
8 #include "content/shell/renderer/test_runner/MockWebRTCDTMFSenderHandler.h" | 7 #include "content/shell/renderer/test_runner/MockWebRTCDTMFSenderHandler.h" |
9 #include "content/shell/renderer/test_runner/MockWebRTCDataChannelHandler.h" | 8 #include "content/shell/renderer/test_runner/MockWebRTCDataChannelHandler.h" |
10 #include "content/shell/renderer/test_runner/TestInterfaces.h" | 9 #include "content/shell/renderer/test_runner/TestInterfaces.h" |
11 #include "content/shell/renderer/test_runner/WebTestDelegate.h" | 10 #include "content/shell/renderer/test_runner/WebTestDelegate.h" |
| 11 #include "content/shell/renderer/test_runner/mock_constraints.h" |
12 #include "third_party/WebKit/public/platform/WebMediaConstraints.h" | 12 #include "third_party/WebKit/public/platform/WebMediaConstraints.h" |
13 #include "third_party/WebKit/public/platform/WebMediaStream.h" | 13 #include "third_party/WebKit/public/platform/WebMediaStream.h" |
14 #include "third_party/WebKit/public/platform/WebMediaStreamTrack.h" | 14 #include "third_party/WebKit/public/platform/WebMediaStreamTrack.h" |
15 #include "third_party/WebKit/public/platform/WebRTCDataChannelInit.h" | 15 #include "third_party/WebKit/public/platform/WebRTCDataChannelInit.h" |
16 #include "third_party/WebKit/public/platform/WebRTCPeerConnectionHandlerClient.h
" | 16 #include "third_party/WebKit/public/platform/WebRTCPeerConnectionHandlerClient.h
" |
17 #include "third_party/WebKit/public/platform/WebRTCStatsResponse.h" | 17 #include "third_party/WebKit/public/platform/WebRTCStatsResponse.h" |
18 #include "third_party/WebKit/public/platform/WebRTCVoidRequest.h" | 18 #include "third_party/WebKit/public/platform/WebRTCVoidRequest.h" |
19 #include "third_party/WebKit/public/platform/WebString.h" | 19 #include "third_party/WebKit/public/platform/WebString.h" |
20 #include "third_party/WebKit/public/platform/WebVector.h" | 20 #include "third_party/WebKit/public/platform/WebVector.h" |
21 | 21 |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 MockWebRTCPeerConnectionHandler::MockWebRTCPeerConnectionHandler(WebRTCPeerConne
ctionHandlerClient* client, TestInterfaces* interfaces) | 152 MockWebRTCPeerConnectionHandler::MockWebRTCPeerConnectionHandler(WebRTCPeerConne
ctionHandlerClient* client, TestInterfaces* interfaces) |
153 : m_client(client) | 153 : m_client(client) |
154 , m_stopped(false) | 154 , m_stopped(false) |
155 , m_streamCount(0) | 155 , m_streamCount(0) |
156 , m_interfaces(interfaces) | 156 , m_interfaces(interfaces) |
157 { | 157 { |
158 } | 158 } |
159 | 159 |
160 bool MockWebRTCPeerConnectionHandler::initialize(const WebRTCConfiguration&, con
st WebMediaConstraints& constraints) | 160 bool MockWebRTCPeerConnectionHandler::initialize(const WebRTCConfiguration&, con
st WebMediaConstraints& constraints) |
161 { | 161 { |
162 if (MockConstraints::verifyConstraints(constraints)) { | 162 if (MockConstraints::VerifyConstraints(constraints)) { |
163 m_interfaces->delegate()->postTask(new RTCPeerConnectionStateTask(this,
m_client, WebRTCPeerConnectionHandlerClient::ICEConnectionStateCompleted, WebRTC
PeerConnectionHandlerClient::ICEGatheringStateComplete)); | 163 m_interfaces->delegate()->postTask(new RTCPeerConnectionStateTask(this,
m_client, WebRTCPeerConnectionHandlerClient::ICEConnectionStateCompleted, WebRTC
PeerConnectionHandlerClient::ICEGatheringStateComplete)); |
164 return true; | 164 return true; |
165 } | 165 } |
166 | 166 |
167 return false; | 167 return false; |
168 } | 168 } |
169 | 169 |
170 void MockWebRTCPeerConnectionHandler::createOffer(const WebRTCSessionDescription
Request& request, const WebMediaConstraints& constraints) | 170 void MockWebRTCPeerConnectionHandler::createOffer(const WebRTCSessionDescription
Request& request, const WebMediaConstraints& constraints) |
171 { | 171 { |
172 WebString shouldSucceed; | 172 WebString shouldSucceed; |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 { | 276 { |
277 return new MockWebRTCDTMFSenderHandler(track, m_interfaces->delegate()); | 277 return new MockWebRTCDTMFSenderHandler(track, m_interfaces->delegate()); |
278 } | 278 } |
279 | 279 |
280 void MockWebRTCPeerConnectionHandler::stop() | 280 void MockWebRTCPeerConnectionHandler::stop() |
281 { | 281 { |
282 m_stopped = true; | 282 m_stopped = true; |
283 } | 283 } |
284 | 284 |
285 } // namespace content | 285 } // namespace content |
OLD | NEW |