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 #ifndef CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCKWEBRTCPEERCONNECTIONHANDLER_H_ | 5 #ifndef CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCKWEBRTCPEERCONNECTIONHANDLER_H_ |
6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCKWEBRTCPEERCONNECTIONHANDLER_H_ | 6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCKWEBRTCPEERCONNECTIONHANDLER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "content/shell/renderer/test_runner/web_task.h" | 9 #include "content/shell/renderer/test_runner/web_task.h" |
10 #include "third_party/WebKit/public/platform/WebRTCPeerConnectionHandler.h" | 10 #include "third_party/WebKit/public/platform/WebRTCPeerConnectionHandler.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 class MockWebRTCPeerConnectionHandler | 23 class MockWebRTCPeerConnectionHandler |
24 : public blink::WebRTCPeerConnectionHandler { | 24 : public blink::WebRTCPeerConnectionHandler { |
25 public: | 25 public: |
26 MockWebRTCPeerConnectionHandler( | 26 MockWebRTCPeerConnectionHandler( |
27 blink::WebRTCPeerConnectionHandlerClient* client, | 27 blink::WebRTCPeerConnectionHandlerClient* client, |
28 TestInterfaces* interfaces); | 28 TestInterfaces* interfaces); |
29 | 29 |
30 // WebRTCPeerConnectionHandler related methods | 30 // WebRTCPeerConnectionHandler related methods |
31 virtual bool initialize( | 31 virtual bool initialize( |
32 const blink::WebRTCConfiguration& configuration, | 32 const blink::WebRTCConfiguration& configuration, |
33 const blink::WebMediaConstraints& constraints) OVERRIDE; | 33 const blink::WebMediaConstraints& constraints) override; |
34 | 34 |
35 virtual void createOffer( | 35 virtual void createOffer( |
36 const blink::WebRTCSessionDescriptionRequest& request, | 36 const blink::WebRTCSessionDescriptionRequest& request, |
37 const blink::WebMediaConstraints& constraints) OVERRIDE; | 37 const blink::WebMediaConstraints& constraints) override; |
38 virtual void createOffer( | 38 virtual void createOffer( |
39 const blink::WebRTCSessionDescriptionRequest& request, | 39 const blink::WebRTCSessionDescriptionRequest& request, |
40 const blink::WebRTCOfferOptions& options) OVERRIDE; | 40 const blink::WebRTCOfferOptions& options) override; |
41 virtual void createAnswer( | 41 virtual void createAnswer( |
42 const blink::WebRTCSessionDescriptionRequest& request, | 42 const blink::WebRTCSessionDescriptionRequest& request, |
43 const blink::WebMediaConstraints& constraints) OVERRIDE; | 43 const blink::WebMediaConstraints& constraints) override; |
44 virtual void setLocalDescription( | 44 virtual void setLocalDescription( |
45 const blink::WebRTCVoidRequest& request, | 45 const blink::WebRTCVoidRequest& request, |
46 const blink::WebRTCSessionDescription& local_description) OVERRIDE; | 46 const blink::WebRTCSessionDescription& local_description) override; |
47 virtual void setRemoteDescription( | 47 virtual void setRemoteDescription( |
48 const blink::WebRTCVoidRequest& request, | 48 const blink::WebRTCVoidRequest& request, |
49 const blink::WebRTCSessionDescription& remote_description) OVERRIDE; | 49 const blink::WebRTCSessionDescription& remote_description) override; |
50 virtual blink::WebRTCSessionDescription localDescription() OVERRIDE; | 50 virtual blink::WebRTCSessionDescription localDescription() override; |
51 virtual blink::WebRTCSessionDescription remoteDescription() OVERRIDE; | 51 virtual blink::WebRTCSessionDescription remoteDescription() override; |
52 virtual bool updateICE( | 52 virtual bool updateICE( |
53 const blink::WebRTCConfiguration& configuration, | 53 const blink::WebRTCConfiguration& configuration, |
54 const blink::WebMediaConstraints& constraints) OVERRIDE; | 54 const blink::WebMediaConstraints& constraints) override; |
55 virtual bool addICECandidate( | 55 virtual bool addICECandidate( |
56 const blink::WebRTCICECandidate& ice_candidate) OVERRIDE; | 56 const blink::WebRTCICECandidate& ice_candidate) override; |
57 virtual bool addICECandidate( | 57 virtual bool addICECandidate( |
58 const blink::WebRTCVoidRequest& request, | 58 const blink::WebRTCVoidRequest& request, |
59 const blink::WebRTCICECandidate& ice_candidate) OVERRIDE; | 59 const blink::WebRTCICECandidate& ice_candidate) override; |
60 virtual bool addStream( | 60 virtual bool addStream( |
61 const blink::WebMediaStream& stream, | 61 const blink::WebMediaStream& stream, |
62 const blink::WebMediaConstraints& constraints) OVERRIDE; | 62 const blink::WebMediaConstraints& constraints) override; |
63 virtual void removeStream(const blink::WebMediaStream& stream) OVERRIDE; | 63 virtual void removeStream(const blink::WebMediaStream& stream) override; |
64 virtual void getStats(const blink::WebRTCStatsRequest& request) OVERRIDE; | 64 virtual void getStats(const blink::WebRTCStatsRequest& request) override; |
65 virtual blink::WebRTCDataChannelHandler* createDataChannel( | 65 virtual blink::WebRTCDataChannelHandler* createDataChannel( |
66 const blink::WebString& label, | 66 const blink::WebString& label, |
67 const blink::WebRTCDataChannelInit& init) OVERRIDE; | 67 const blink::WebRTCDataChannelInit& init) override; |
68 virtual blink::WebRTCDTMFSenderHandler* createDTMFSender( | 68 virtual blink::WebRTCDTMFSenderHandler* createDTMFSender( |
69 const blink::WebMediaStreamTrack& track) OVERRIDE; | 69 const blink::WebMediaStreamTrack& track) override; |
70 virtual void stop() OVERRIDE; | 70 virtual void stop() override; |
71 | 71 |
72 // WebTask related methods | 72 // WebTask related methods |
73 WebTaskList* mutable_task_list() { return &task_list_; } | 73 WebTaskList* mutable_task_list() { return &task_list_; } |
74 | 74 |
75 private: | 75 private: |
76 MockWebRTCPeerConnectionHandler(); | 76 MockWebRTCPeerConnectionHandler(); |
77 | 77 |
78 blink::WebRTCPeerConnectionHandlerClient* client_; | 78 blink::WebRTCPeerConnectionHandlerClient* client_; |
79 bool stopped_; | 79 bool stopped_; |
80 WebTaskList task_list_; | 80 WebTaskList task_list_; |
81 blink::WebRTCSessionDescription local_description_; | 81 blink::WebRTCSessionDescription local_description_; |
82 blink::WebRTCSessionDescription remote_description_; | 82 blink::WebRTCSessionDescription remote_description_; |
83 int stream_count_; | 83 int stream_count_; |
84 TestInterfaces* interfaces_; | 84 TestInterfaces* interfaces_; |
85 | 85 |
86 DISALLOW_COPY_AND_ASSIGN(MockWebRTCPeerConnectionHandler); | 86 DISALLOW_COPY_AND_ASSIGN(MockWebRTCPeerConnectionHandler); |
87 }; | 87 }; |
88 | 88 |
89 } // namespace content | 89 } // namespace content |
90 | 90 |
91 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCKWEBRTCPEERCONNECTIONHANDLER_H_ | 91 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCKWEBRTCPEERCONNECTIONHANDLER_H_ |
OLD | NEW |