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

Side by Side Diff: content/shell/test_runner/mock_webrtc_peer_connection_handler.cc

Issue 2706563003: Create the API that returns the RTCConfiguration of the PeerConnection.
Patch Set: rebaselining Created 3 years, 9 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
OLDNEW
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/test_runner/mock_webrtc_peer_connection_handler.h" 5 #include "content/shell/test_runner/mock_webrtc_peer_connection_handler.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/bind.h" 13 #include "base/bind.h"
14 #include "base/bind_helpers.h" 14 #include "base/bind_helpers.h"
15 #include "content/shell/test_runner/mock_webrtc_data_channel_handler.h" 15 #include "content/shell/test_runner/mock_webrtc_data_channel_handler.h"
16 #include "content/shell/test_runner/mock_webrtc_dtmf_sender_handler.h" 16 #include "content/shell/test_runner/mock_webrtc_dtmf_sender_handler.h"
17 #include "content/shell/test_runner/test_interfaces.h" 17 #include "content/shell/test_runner/test_interfaces.h"
18 #include "content/shell/test_runner/web_test_delegate.h" 18 #include "content/shell/test_runner/web_test_delegate.h"
19 #include "third_party/WebKit/public/platform/WebMediaStream.h" 19 #include "third_party/WebKit/public/platform/WebMediaStream.h"
20 #include "third_party/WebKit/public/platform/WebMediaStreamSource.h" 20 #include "third_party/WebKit/public/platform/WebMediaStreamSource.h"
21 #include "third_party/WebKit/public/platform/WebMediaStreamTrack.h" 21 #include "third_party/WebKit/public/platform/WebMediaStreamTrack.h"
22 #include "third_party/WebKit/public/platform/WebRTCAnswerOptions.h" 22 #include "third_party/WebKit/public/platform/WebRTCAnswerOptions.h"
23 #include "third_party/WebKit/public/platform/WebRTCConfiguration.h"
23 #include "third_party/WebKit/public/platform/WebRTCDataChannelInit.h" 24 #include "third_party/WebKit/public/platform/WebRTCDataChannelInit.h"
24 #include "third_party/WebKit/public/platform/WebRTCOfferOptions.h" 25 #include "third_party/WebKit/public/platform/WebRTCOfferOptions.h"
25 #include "third_party/WebKit/public/platform/WebRTCPeerConnectionHandlerClient.h " 26 #include "third_party/WebKit/public/platform/WebRTCPeerConnectionHandlerClient.h "
26 #include "third_party/WebKit/public/platform/WebRTCStatsResponse.h" 27 #include "third_party/WebKit/public/platform/WebRTCStatsResponse.h"
27 #include "third_party/WebKit/public/platform/WebRTCVoidRequest.h" 28 #include "third_party/WebKit/public/platform/WebRTCVoidRequest.h"
28 #include "third_party/WebKit/public/platform/WebString.h" 29 #include "third_party/WebKit/public/platform/WebString.h"
29 #include "third_party/WebKit/public/platform/WebVector.h" 30 #include "third_party/WebKit/public/platform/WebVector.h"
30 31
31 using namespace blink; 32 using namespace blink;
32 33
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 436
436 WebRTCSessionDescription MockWebRTCPeerConnectionHandler::remoteDescription() { 437 WebRTCSessionDescription MockWebRTCPeerConnectionHandler::remoteDescription() {
437 return remote_description_; 438 return remote_description_;
438 } 439 }
439 440
440 WebRTCErrorType MockWebRTCPeerConnectionHandler::setConfiguration( 441 WebRTCErrorType MockWebRTCPeerConnectionHandler::setConfiguration(
441 const WebRTCConfiguration& configuration) { 442 const WebRTCConfiguration& configuration) {
442 return WebRTCErrorType::kNone; 443 return WebRTCErrorType::kNone;
443 } 444 }
444 445
446 blink::WebRTCConfiguration MockWebRTCPeerConnectionHandler::getConfiguration() {
447 return blink::WebRTCConfiguration();
448 }
449
445 bool MockWebRTCPeerConnectionHandler::addICECandidate( 450 bool MockWebRTCPeerConnectionHandler::addICECandidate(
446 const WebRTCICECandidate& ice_candidate) { 451 const WebRTCICECandidate& ice_candidate) {
447 client_->didGenerateICECandidate(ice_candidate); 452 client_->didGenerateICECandidate(ice_candidate);
448 return true; 453 return true;
449 } 454 }
450 455
451 bool MockWebRTCPeerConnectionHandler::addICECandidate( 456 bool MockWebRTCPeerConnectionHandler::addICECandidate(
452 const WebRTCVoidRequest& request, 457 const WebRTCVoidRequest& request,
453 const WebRTCICECandidate& ice_candidate) { 458 const WebRTCICECandidate& ice_candidate) {
454 PostRequestResult(request); 459 PostRequestResult(request);
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 const WebMediaStreamTrack& track) { 552 const WebMediaStreamTrack& track) {
548 return new MockWebRTCDTMFSenderHandler(track, interfaces_->GetDelegate()); 553 return new MockWebRTCDTMFSenderHandler(track, interfaces_->GetDelegate());
549 } 554 }
550 555
551 void MockWebRTCPeerConnectionHandler::stop() { 556 void MockWebRTCPeerConnectionHandler::stop() {
552 stopped_ = true; 557 stopped_ = true;
553 weak_factory_.InvalidateWeakPtrs(); 558 weak_factory_.InvalidateWeakPtrs();
554 } 559 }
555 560
556 } // namespace test_runner 561 } // namespace test_runner
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698