Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCKWEBRTCPEERCONNECTIONHANDLER_H_ | |
| 6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCKWEBRTCPEERCONNECTIONHANDLER_H_ | |
| 7 | |
| 8 #include "base/basictypes.h" | |
| 9 #include "content/shell/renderer/test_runner/TestCommon.h" | |
| 10 #include "content/shell/renderer/test_runner/WebTask.h" | |
| 11 #include "third_party/WebKit/public/platform/WebRTCPeerConnectionHandler.h" | |
| 12 #include "third_party/WebKit/public/platform/WebRTCSessionDescription.h" | |
| 13 #include "third_party/WebKit/public/platform/WebRTCSessionDescriptionRequest.h" | |
| 14 #include "third_party/WebKit/public/platform/WebRTCStatsRequest.h" | |
| 15 | |
| 16 namespace blink { | |
| 17 class WebRTCPeerConnectionHandlerClient; | |
| 18 }; | |
| 19 | |
| 20 namespace content { | |
| 21 | |
| 22 class TestInterfaces; | |
| 23 | |
| 24 class MockWebRTCPeerConnectionHandler | |
| 25 : public blink::WebRTCPeerConnectionHandler { | |
| 26 public: | |
| 27 MockWebRTCPeerConnectionHandler(blink::WebRTCPeerConnectionHandlerClient* clie nt, | |
|
jochen (gone - plz use gerrit)
2014/06/05 08:26:52
please clang-format so the lines stay <= 80c
Nikhil
2014/06/05 08:57:44
Done.
| |
| 28 TestInterfaces* interfaces); | |
| 29 | |
| 30 // WebRTCPeerConnectionHandler related methods | |
| 31 virtual bool initialize(const blink::WebRTCConfiguration& configuration, | |
| 32 const blink::WebMediaConstraints& constraints) OVERRID E; | |
| 33 | |
| 34 virtual void createOffer(const blink::WebRTCSessionDescriptionRequest& request , | |
| 35 const blink::WebMediaConstraints& constraints) OVERRI DE; | |
| 36 virtual void createAnswer(const blink::WebRTCSessionDescriptionRequest& reques t, | |
| 37 const blink::WebMediaConstraints& constraints) OVERR IDE; | |
| 38 virtual void setLocalDescription( | |
| 39 const blink::WebRTCVoidRequest& request, | |
| 40 const blink::WebRTCSessionDescription& local_description) OVERRIDE; | |
| 41 virtual void setRemoteDescription( | |
| 42 const blink::WebRTCVoidRequest& request, | |
| 43 const blink::WebRTCSessionDescription& remote_description) OVERRIDE; | |
| 44 virtual blink::WebRTCSessionDescription localDescription() OVERRIDE; | |
| 45 virtual blink::WebRTCSessionDescription remoteDescription() OVERRIDE; | |
| 46 virtual bool updateICE(const blink::WebRTCConfiguration& configuration, | |
| 47 const blink::WebMediaConstraints& constraints) OVERRIDE ; | |
| 48 virtual bool addICECandidate(const blink::WebRTCICECandidate& ice_candidate) O VERRIDE; | |
| 49 virtual bool addICECandidate(const blink::WebRTCVoidRequest& request, | |
| 50 const blink::WebRTCICECandidate& ice_candidate) O VERRIDE; | |
| 51 virtual bool addStream(const blink::WebMediaStream& stream, | |
| 52 const blink::WebMediaConstraints& constraints) OVERRIDE ; | |
| 53 virtual void removeStream(const blink::WebMediaStream& stream) OVERRIDE; | |
| 54 virtual void getStats(const blink::WebRTCStatsRequest& request) OVERRIDE; | |
| 55 virtual blink::WebRTCDataChannelHandler* createDataChannel( | |
| 56 const blink::WebString& label, | |
| 57 const blink::WebRTCDataChannelInit& init) OVERRIDE; | |
| 58 virtual blink::WebRTCDTMFSenderHandler* createDTMFSender( | |
| 59 const blink::WebMediaStreamTrack& track) OVERRIDE; | |
| 60 virtual void stop() OVERRIDE; | |
| 61 | |
| 62 // WebTask related methods | |
| 63 WebTaskList* mutable_task_list() { return &task_list_; } | |
| 64 | |
| 65 private: | |
| 66 MockWebRTCPeerConnectionHandler(); | |
| 67 | |
| 68 blink::WebRTCPeerConnectionHandlerClient* client_; | |
| 69 bool stopped_; | |
| 70 WebTaskList task_list_; | |
| 71 blink::WebRTCSessionDescription local_description_; | |
| 72 blink::WebRTCSessionDescription remote_description_; | |
| 73 int stream_count_; | |
| 74 TestInterfaces* interfaces_; | |
| 75 | |
| 76 DISALLOW_COPY_AND_ASSIGN(MockWebRTCPeerConnectionHandler); | |
| 77 }; | |
| 78 | |
| 79 } // namespace content | |
| 80 | |
| 81 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCKWEBRTCPEERCONNECTIONHANDLER_H_ | |
| OLD | NEW |