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_RENDERER_MEDIA_MOCK_DATA_CHANNEL_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_MOCK_DATA_CHANNEL_IMPL_H_ |
6 #define CONTENT_RENDERER_MEDIA_MOCK_DATA_CHANNEL_IMPL_H_ | 6 #define CONTENT_RENDERER_MEDIA_MOCK_DATA_CHANNEL_IMPL_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 12 matching lines...) Expand all Loading... |
23 void UnregisterObserver() override; | 23 void UnregisterObserver() override; |
24 std::string label() const override; | 24 std::string label() const override; |
25 bool reliable() const override; | 25 bool reliable() const override; |
26 bool ordered() const override; | 26 bool ordered() const override; |
27 uint16_t maxRetransmitTime() const override; | 27 uint16_t maxRetransmitTime() const override; |
28 uint16_t maxRetransmits() const override; | 28 uint16_t maxRetransmits() const override; |
29 std::string protocol() const override; | 29 std::string protocol() const override; |
30 bool negotiated() const override; | 30 bool negotiated() const override; |
31 int id() const override; | 31 int id() const override; |
32 DataState state() const override; | 32 DataState state() const override; |
| 33 uint32_t messages_sent() const override; |
| 34 uint64_t bytes_sent() const override; |
| 35 uint32_t messages_received() const override; |
| 36 uint64_t bytes_received() const override; |
33 uint64_t buffered_amount() const override; | 37 uint64_t buffered_amount() const override; |
34 void Close() override; | 38 void Close() override; |
35 bool Send(const webrtc::DataBuffer& buffer) override; | 39 bool Send(const webrtc::DataBuffer& buffer) override; |
36 | 40 |
37 // For testing. | 41 // For testing. |
38 void changeState(DataState state); | 42 void changeState(DataState state); |
39 | 43 |
40 protected: | 44 protected: |
41 ~MockDataChannel() override; | 45 ~MockDataChannel() override; |
42 | 46 |
43 private: | 47 private: |
44 std::string label_; | 48 std::string label_; |
45 bool reliable_; | 49 bool reliable_; |
46 webrtc::DataChannelInterface::DataState state_; | 50 webrtc::DataChannelInterface::DataState state_; |
47 webrtc::DataChannelInit config_; | 51 webrtc::DataChannelInit config_; |
48 webrtc::DataChannelObserver* observer_; | 52 webrtc::DataChannelObserver* observer_; |
49 | 53 |
50 DISALLOW_COPY_AND_ASSIGN(MockDataChannel); | 54 DISALLOW_COPY_AND_ASSIGN(MockDataChannel); |
51 }; | 55 }; |
52 | 56 |
53 } // namespace content | 57 } // namespace content |
54 | 58 |
55 #endif // CONTENT_RENDERER_MEDIA_MOCK_DATA_CHANNEL_IMPL_H_ | 59 #endif // CONTENT_RENDERER_MEDIA_MOCK_DATA_CHANNEL_IMPL_H_ |
OLD | NEW |