OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 REMOTING_PROTOCOL_CONNECTION_TESTER_H_ | 5 #ifndef REMOTING_PROTOCOL_CONNECTION_TESTER_H_ |
6 #define REMOTING_PROTOCOL_CONNECTION_TESTER_H_ | 6 #define REMOTING_PROTOCOL_CONNECTION_TESTER_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <memory> | 9 #include <memory> |
10 #include <vector> | 10 #include <vector> |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 MessagePipeConnectionTester(MessagePipe* client_pipe, | 114 MessagePipeConnectionTester(MessagePipe* client_pipe, |
115 MessagePipe* host_pipe, | 115 MessagePipe* host_pipe, |
116 int message_size, | 116 int message_size, |
117 int message_count); | 117 int message_count); |
118 ~MessagePipeConnectionTester() override; | 118 ~MessagePipeConnectionTester() override; |
119 | 119 |
120 void RunAndCheckResults(); | 120 void RunAndCheckResults(); |
121 | 121 |
122 protected: | 122 protected: |
123 // MessagePipe::EventHandler interface. | 123 // MessagePipe::EventHandler interface. |
| 124 void OnMessagePipeOpen() override; |
124 void OnMessageReceived(std::unique_ptr<CompoundBuffer> message) override; | 125 void OnMessageReceived(std::unique_ptr<CompoundBuffer> message) override; |
125 void OnMessagePipeClosed() override; | 126 void OnMessagePipeClosed() override; |
126 | 127 |
127 private: | 128 private: |
128 base::RunLoop run_loop_; | 129 base::RunLoop run_loop_; |
129 MessagePipe* host_pipe_; | 130 MessagePipe* host_pipe_; |
130 MessagePipe* client_pipe_; | 131 MessagePipe* client_pipe_; |
131 int message_size_; | 132 int message_size_; |
132 int message_count_; | 133 int message_count_; |
133 | 134 |
134 std::vector<std::unique_ptr<VideoPacket>> sent_messages_; | 135 std::vector<std::unique_ptr<VideoPacket>> sent_messages_; |
135 std::vector<std::unique_ptr<VideoPacket>> received_messages_; | 136 std::vector<std::unique_ptr<VideoPacket>> received_messages_; |
136 }; | 137 }; |
137 | 138 |
138 } // namespace protocol | 139 } // namespace protocol |
139 } // namespace remoting | 140 } // namespace remoting |
140 | 141 |
141 #endif // REMOTING_PROTOCOL_CONNECTION_TESTER_H_ | 142 #endif // REMOTING_PROTOCOL_CONNECTION_TESTER_H_ |
OLD | NEW |