OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_FAKE_SESSION_H_ | 5 #ifndef REMOTING_PROTOCOL_FAKE_SESSION_H_ |
6 #define REMOTING_PROTOCOL_FAKE_SESSION_H_ | 6 #define REMOTING_PROTOCOL_FAKE_SESSION_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "net/socket/socket.h" | 13 #include "net/socket/socket.h" |
14 #include "net/socket/stream_socket.h" | 14 #include "net/socket/stream_socket.h" |
15 #include "remoting/protocol/session.h" | 15 #include "remoting/protocol/session.h" |
16 | 16 |
| 17 class MessageLoop; |
| 18 |
17 namespace remoting { | 19 namespace remoting { |
18 namespace protocol { | 20 namespace protocol { |
19 | 21 |
20 extern const char kTestJid[]; | 22 extern const char kTestJid[]; |
21 | 23 |
22 // FakeSocket implement net::Socket interface for FakeConnection. All data | 24 // FakeSocket implement net::Socket interface for FakeConnection. All data |
23 // written to FakeSocket is stored in a buffer returned by written_data(). | 25 // written to FakeSocket is stored in a buffer returned by written_data(). |
24 // Read() reads data from another buffer that can be set with AppendInputData(). | 26 // Read() reads data from another buffer that can be set with AppendInputData(). |
25 // Pending reads are supported, so if there is a pending read AppendInputData() | 27 // Pending reads are supported, so if there is a pending read AppendInputData() |
26 // calls the read callback. | 28 // calls the read callback. |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 std::string jid_; | 177 std::string jid_; |
176 bool closed_; | 178 bool closed_; |
177 | 179 |
178 DISALLOW_COPY_AND_ASSIGN(FakeSession); | 180 DISALLOW_COPY_AND_ASSIGN(FakeSession); |
179 }; | 181 }; |
180 | 182 |
181 } // namespace protocol | 183 } // namespace protocol |
182 } // namespace remoting | 184 } // namespace remoting |
183 | 185 |
184 #endif // REMOTING_PROTOCOL_FAKE_SESSION_H_ | 186 #endif // REMOTING_PROTOCOL_FAKE_SESSION_H_ |
OLD | NEW |