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

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

Issue 316093005: test_runner: Migrate MockWebRTCPeerConnectionHandler to Chromium C++ style (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments Created 6 years, 6 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
(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 : public blink::WebRTCPeerConnectionHandle r {
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* mutable_task_list() { 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 DISALLOW_COPY_AND_ASSIGN(MockWebRTCPeerConnectionHandler);
61 };
62
63 } // namespace content
64
65 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCKWEBRTCPEERCONNECTIONHANDLER_H_
OLDNEW
« no previous file with comments | « content/content_shell.gypi ('k') | content/shell/renderer/test_runner/MockWebRTCPeerConnectionHandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698