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/message_loop.h" | 8 #include "base/message_loop/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 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 } | 313 } |
314 | 314 |
315 const SessionConfig& FakeSession::config() { | 315 const SessionConfig& FakeSession::config() { |
316 return config_; | 316 return config_; |
317 } | 317 } |
318 | 318 |
319 void FakeSession::set_config(const SessionConfig& config) { | 319 void FakeSession::set_config(const SessionConfig& config) { |
320 config_ = config; | 320 config_ = config; |
321 } | 321 } |
322 | 322 |
323 StreamChannelFactory* FakeSession::GetTransportChannelFactory() { | 323 ChannelFactory* FakeSession::GetTransportChannelFactory() { |
324 return this; | 324 return this; |
325 } | 325 } |
326 | 326 |
327 StreamChannelFactory* FakeSession::GetMultiplexedChannelFactory() { | 327 ChannelFactory* FakeSession::GetMultiplexedChannelFactory() { |
328 return this; | 328 return this; |
329 } | 329 } |
330 | 330 |
331 void FakeSession::Close() { | 331 void FakeSession::Close() { |
332 closed_ = true; | 332 closed_ = true; |
333 } | 333 } |
334 | 334 |
335 void FakeSession::CreateChannel(const std::string& name, | 335 void FakeSession::CreateChannel(const std::string& name, |
336 const ChannelCreatedCallback& callback) { | 336 const ChannelCreatedCallback& callback) { |
337 scoped_ptr<FakeSocket> channel; | 337 scoped_ptr<FakeSocket> channel; |
(...skipping 19 matching lines...) Expand all Loading... |
357 callback.Run(scoped_ptr<net::StreamSocket>(stream_channels_[name])); | 357 callback.Run(scoped_ptr<net::StreamSocket>(stream_channels_[name])); |
358 } | 358 } |
359 | 359 |
360 void FakeSession::CancelChannelCreation(const std::string& name) { | 360 void FakeSession::CancelChannelCreation(const std::string& name) { |
361 stream_channels_.erase(name); | 361 stream_channels_.erase(name); |
362 datagram_channels_.erase(name); | 362 datagram_channels_.erase(name); |
363 } | 363 } |
364 | 364 |
365 } // namespace protocol | 365 } // namespace protocol |
366 } // namespace remoting | 366 } // namespace remoting |
OLD | NEW |