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

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

Issue 110533009: Import TestRunner library into chromium. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 7 years 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
(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 MockWebRTCPeerConnectionHandler_h
6 #define MockWebRTCPeerConnectionHandler_h
7
8 #include "content/shell/renderer/test_runner/TestCommon.h"
9 #include "content/shell/renderer/test_runner/WebTask.h"
10 #include "third_party/WebKit/public/platform/WebNonCopyable.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 WebTestRunner {
21
22 class TestInterfaces;
23
24 class MockWebRTCPeerConnectionHandler : public blink::WebRTCPeerConnectionHandle r, public blink::WebNonCopyable {
25 public:
26 MockWebRTCPeerConnectionHandler(blink::WebRTCPeerConnectionHandlerClient*, T estInterfaces*);
27
28 virtual bool initialize(const blink::WebRTCConfiguration&, const blink::WebM ediaConstraints&) OVERRIDE;
29
30 virtual void createOffer(const blink::WebRTCSessionDescriptionRequest&, cons t blink::WebMediaConstraints&) OVERRIDE;
31 virtual void createAnswer(const blink::WebRTCSessionDescriptionRequest&, con st blink::WebMediaConstraints&) OVERRIDE;
32 virtual void setLocalDescription(const blink::WebRTCVoidRequest&, const blin k::WebRTCSessionDescription&) OVERRIDE;
33 virtual void setRemoteDescription(const blink::WebRTCVoidRequest&, const bli nk::WebRTCSessionDescription&) OVERRIDE;
34 virtual blink::WebRTCSessionDescription localDescription() OVERRIDE;
35 virtual blink::WebRTCSessionDescription remoteDescription() OVERRIDE;
36 virtual bool updateICE(const blink::WebRTCConfiguration&, const blink::WebMe diaConstraints&) OVERRIDE;
37 virtual bool addICECandidate(const blink::WebRTCICECandidate&) OVERRIDE;
38 virtual bool addICECandidate(const blink::WebRTCVoidRequest&, const blink::W ebRTCICECandidate&) OVERRIDE;
39 virtual bool addStream(const blink::WebMediaStream&, const blink::WebMediaCo nstraints&) OVERRIDE;
40 virtual void removeStream(const blink::WebMediaStream&) OVERRIDE;
41 virtual void getStats(const blink::WebRTCStatsRequest&) OVERRIDE;
42 virtual blink::WebRTCDataChannelHandler* createDataChannel(const blink::WebS tring& label, const blink::WebRTCDataChannelInit&) OVERRIDE;
43 virtual blink::WebRTCDTMFSenderHandler* createDTMFSender(const blink::WebMed iaStreamTrack&) OVERRIDE;
44 virtual void stop() OVERRIDE;
45
46 // WebTask related methods
47 WebTaskList* taskList() { return &m_taskList; }
48
49 private:
50 MockWebRTCPeerConnectionHandler() { }
51
52 blink::WebRTCPeerConnectionHandlerClient* m_client;
53 bool m_stopped;
54 WebTaskList m_taskList;
55 blink::WebRTCSessionDescription m_localDescription;
56 blink::WebRTCSessionDescription m_remoteDescription;
57 int m_streamCount;
58 TestInterfaces* m_interfaces;
59 };
60
61 }
62
63 #endif // MockWebRTCPeerConnectionHandler_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698