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

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

Issue 305923002: test_runner: Migrate MockWebRTCDataChannelHandler to Chromium C++ style. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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_MOCKWEBRTCDATACHANNELHANDLER_H_
6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCKWEBRTCDATACHANNELHANDLER_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/WebRTCDataChannelHandler.h"
12 #include "third_party/WebKit/public/platform/WebRTCDataChannelInit.h"
13 #include "third_party/WebKit/public/platform/WebString.h"
14
15 namespace content {
16
17 class WebTestDelegate;
18
19 class MockWebRTCDataChannelHandler : public blink::WebRTCDataChannelHandler {
20 public:
21 MockWebRTCDataChannelHandler(blink::WebString label,
22 const blink::WebRTCDataChannelInit&,
23 WebTestDelegate*);
24
25 virtual void setClient(blink::WebRTCDataChannelHandlerClient*) OVERRIDE;
26 virtual blink::WebString label() OVERRIDE;
27 virtual bool isReliable() OVERRIDE;
28 virtual bool ordered() const OVERRIDE;
29 virtual unsigned short maxRetransmitTime() const OVERRIDE;
30 virtual unsigned short maxRetransmits() const OVERRIDE;
31 virtual blink::WebString protocol() const OVERRIDE;
32 virtual bool negotiated() const OVERRIDE;
33 virtual unsigned short id() const OVERRIDE;
34 virtual unsigned long bufferedAmount() OVERRIDE;
35 virtual bool sendStringData(const blink::WebString&) OVERRIDE;
36 virtual bool sendRawData(const char*, size_t) OVERRIDE;
37 virtual void close() OVERRIDE;
38
39 // WebTask related methods
40 WebTaskList* mutable_task_list() { return &task_list_; }
41
42 private:
43 MockWebRTCDataChannelHandler();
44
45 blink::WebRTCDataChannelHandlerClient* client_;
46 blink::WebString label_;
47 blink::WebRTCDataChannelInit init_;
48 bool reliable_;
49 WebTaskList task_list_;
50 WebTestDelegate* delegate_;
51
52 DISALLOW_COPY_AND_ASSIGN(MockWebRTCDataChannelHandler);
53 };
54
55 } // namespace content
56
57 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCKWEBRTCDATACHANNELHANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698