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 } | |
Sergey Ulanov
2012/01/23 20:33:37
NOTIMPLEMENTED()
Lambros
2012/01/24 19:50:50
Done.
| |
248 | |
246 Session::Error FakeSession::error() { | 249 Session::Error FakeSession::error() { |
247 return error_; | 250 return error_; |
248 } | 251 } |
249 | 252 |
250 void FakeSession::CreateStreamChannel( | 253 void FakeSession::CreateStreamChannel( |
251 const std::string& name, const StreamChannelCallback& callback) { | 254 const std::string& name, const StreamChannelCallback& callback) { |
252 FakeSocket* channel = new FakeSocket(); | 255 FakeSocket* channel = new FakeSocket(); |
253 stream_channels_[name] = channel; | 256 stream_channels_[name] = channel; |
254 callback.Run(channel); | 257 callback.Run(channel); |
255 } | 258 } |
(...skipping 23 matching lines...) Expand all Loading... | |
279 void FakeSession::set_config(const SessionConfig& config) { | 282 void FakeSession::set_config(const SessionConfig& config) { |
280 config_ = config; | 283 config_ = config; |
281 } | 284 } |
282 | 285 |
283 void FakeSession::Close() { | 286 void FakeSession::Close() { |
284 closed_ = true; | 287 closed_ = true; |
285 } | 288 } |
286 | 289 |
287 } // namespace protocol | 290 } // namespace protocol |
288 } // namespace remoting | 291 } // namespace remoting |
OLD | NEW |