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 #include "remoting/protocol/fake_session.h" | 5 #include "remoting/protocol/fake_session.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "net/base/address_list.h" | 9 #include "net/base/address_list.h" |
10 #include "net/base/io_buffer.h" | 10 #include "net/base/io_buffer.h" |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 } | 236 } |
237 | 237 |
238 FakeUdpSocket* FakeSession::GetDatagramChannel(const std::string& name) { | 238 FakeUdpSocket* FakeSession::GetDatagramChannel(const std::string& name) { |
239 return datagram_channels_[name]; | 239 return datagram_channels_[name]; |
240 } | 240 } |
241 | 241 |
242 void FakeSession::SetStateChangeCallback(const StateChangeCallback& callback) { | 242 void FakeSession::SetStateChangeCallback(const StateChangeCallback& callback) { |
243 callback_ = callback; | 243 callback_ = callback; |
244 } | 244 } |
245 | 245 |
| 246 void FakeSession::SetRouteChangeCallback(const RouteChangeCallback& callback) { |
| 247 NOTIMPLEMENTED(); |
| 248 } |
| 249 |
246 Session::Error FakeSession::error() { | 250 Session::Error FakeSession::error() { |
247 return error_; | 251 return error_; |
248 } | 252 } |
249 | 253 |
250 void FakeSession::CreateStreamChannel( | 254 void FakeSession::CreateStreamChannel( |
251 const std::string& name, const StreamChannelCallback& callback) { | 255 const std::string& name, const StreamChannelCallback& callback) { |
252 FakeSocket* channel = new FakeSocket(); | 256 FakeSocket* channel = new FakeSocket(); |
253 stream_channels_[name] = channel; | 257 stream_channels_[name] = channel; |
254 callback.Run(channel); | 258 callback.Run(channel); |
255 } | 259 } |
(...skipping 23 matching lines...) Expand all Loading... |
279 void FakeSession::set_config(const SessionConfig& config) { | 283 void FakeSession::set_config(const SessionConfig& config) { |
280 config_ = config; | 284 config_ = config; |
281 } | 285 } |
282 | 286 |
283 void FakeSession::Close() { | 287 void FakeSession::Close() { |
284 closed_ = true; | 288 closed_ = true; |
285 } | 289 } |
286 | 290 |
287 } // namespace protocol | 291 } // namespace protocol |
288 } // namespace remoting | 292 } // namespace remoting |
OLD | NEW |