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 #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 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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) { | 246 void FakeSession::SetRouteChangeCallback(const RouteChangeCallback& callback) { |
247 NOTIMPLEMENTED(); | 247 NOTIMPLEMENTED(); |
248 } | 248 } |
249 | 249 |
250 Session::Error FakeSession::error() { | 250 ErrorCode FakeSession::error() { |
251 return error_; | 251 return error_; |
252 } | 252 } |
253 | 253 |
254 void FakeSession::CreateStreamChannel( | 254 void FakeSession::CreateStreamChannel( |
255 const std::string& name, const StreamChannelCallback& callback) { | 255 const std::string& name, const StreamChannelCallback& callback) { |
256 scoped_ptr<FakeSocket> channel(new FakeSocket()); | 256 scoped_ptr<FakeSocket> channel(new FakeSocket()); |
257 stream_channels_[name] = channel.get(); | 257 stream_channels_[name] = channel.get(); |
258 callback.Run(channel.PassAs<net::StreamSocket>()); | 258 callback.Run(channel.PassAs<net::StreamSocket>()); |
259 } | 259 } |
260 | 260 |
(...skipping 22 matching lines...) Expand all Loading... |
283 void FakeSession::set_config(const SessionConfig& config) { | 283 void FakeSession::set_config(const SessionConfig& config) { |
284 config_ = config; | 284 config_ = config; |
285 } | 285 } |
286 | 286 |
287 void FakeSession::Close() { | 287 void FakeSession::Close() { |
288 closed_ = true; | 288 closed_ = true; |
289 } | 289 } |
290 | 290 |
291 } // namespace protocol | 291 } // namespace protocol |
292 } // namespace remoting | 292 } // namespace remoting |
OLD | NEW |