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/message_loop.h" | 7 #include "base/message_loop.h" |
8 #include "net/base/io_buffer.h" | 8 #include "net/base/io_buffer.h" |
9 #include "net/base/net_errors.h" | 9 #include "net/base/net_errors.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 void FakeSession::CreateDatagramChannel( | 238 void FakeSession::CreateDatagramChannel( |
239 const std::string& name, const DatagramChannelCallback& callback) { | 239 const std::string& name, const DatagramChannelCallback& callback) { |
240 FakeUdpSocket* channel = new FakeUdpSocket(); | 240 FakeUdpSocket* channel = new FakeUdpSocket(); |
241 datagram_channels_[name] = channel; | 241 datagram_channels_[name] = channel; |
242 callback.Run(channel); | 242 callback.Run(channel); |
243 } | 243 } |
244 | 244 |
245 void FakeSession::CancelChannelCreation(const std::string& name) { | 245 void FakeSession::CancelChannelCreation(const std::string& name) { |
246 } | 246 } |
247 | 247 |
248 FakeSocket* FakeSession::control_channel() { | |
249 return &control_channel_; | |
250 } | |
251 | |
252 FakeSocket* FakeSession::event_channel() { | |
253 return &event_channel_; | |
254 } | |
255 | |
256 const std::string& FakeSession::jid() { | 248 const std::string& FakeSession::jid() { |
257 return jid_; | 249 return jid_; |
258 } | 250 } |
259 | 251 |
260 const CandidateSessionConfig* FakeSession::candidate_config() { | 252 const CandidateSessionConfig* FakeSession::candidate_config() { |
261 return candidate_config_.get(); | 253 return candidate_config_.get(); |
262 } | 254 } |
263 | 255 |
264 const SessionConfig& FakeSession::config() { | 256 const SessionConfig& FakeSession::config() { |
265 return config_; | 257 return config_; |
(...skipping 26 matching lines...) Expand all Loading... |
292 const std::string& FakeSession::shared_secret() { | 284 const std::string& FakeSession::shared_secret() { |
293 return shared_secret_; | 285 return shared_secret_; |
294 } | 286 } |
295 | 287 |
296 void FakeSession::Close() { | 288 void FakeSession::Close() { |
297 closed_ = true; | 289 closed_ = true; |
298 } | 290 } |
299 | 291 |
300 } // namespace protocol | 292 } // namespace protocol |
301 } // namespace remoting | 293 } // namespace remoting |
OLD | NEW |