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

Side by Side Diff: content/shell/renderer/test_runner/MockWebRTCPeerConnectionHandler.cpp

Issue 295983008: test_runner: Migrate MockConstraint to our Chromium C++ style. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 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
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
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
OLDNEW
« no previous file with comments | « content/shell/renderer/test_runner/MockConstraints.cpp ('k') | content/shell/renderer/test_runner/WebUserMediaClientMock.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698