| 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/host/desktop_environment_fake.h" | 5 #include "remoting/host/desktop_environment_fake.h" |
| 6 | 6 |
| 7 #include "base/task.h" | 7 #include "base/task.h" |
| 8 | 8 |
| 9 using remoting::protocol::InputStub; | 9 using remoting::protocol::InputStub; |
| 10 | 10 |
| 11 namespace remoting { | 11 namespace remoting { |
| 12 | 12 |
| 13 DesktopEnvironmentFake::DesktopEnvironmentFake(Capturer* capturer, | 13 DesktopEnvironmentFake::DesktopEnvironmentFake(Capturer* capturer, |
| 14 InputStub* input_stub) | 14 InputStub* input_stub) |
| 15 : DesktopEnvironment(capturer, input_stub) { | 15 : DesktopEnvironment(capturer, input_stub) { |
| 16 } | 16 } |
| 17 | 17 |
| 18 DesktopEnvironmentFake::~DesktopEnvironmentFake() {} | 18 DesktopEnvironmentFake::~DesktopEnvironmentFake() {} |
| 19 | 19 |
| 20 void DesktopEnvironmentFake::BeginSessionRequest( | 20 void DesktopEnvironmentFake::BeginSessionRequest( |
| 21 const protocol::LocalLoginCredentials* credentials, Task* done) { | 21 protocol::ConnectionToClient* connection, |
| 22 const protocol::LocalLoginCredentials* credentials, |
| 23 Task* done) { |
| 22 DCHECK(event_handler_); | 24 DCHECK(event_handler_); |
| 23 | 25 |
| 24 // For unit-test, don't require a valid Unix user/password for connection. | 26 // For unit-test, don't require a valid Unix user/password for connection. |
| 25 event_handler_->LocalLoginSucceeded(); | 27 event_handler_->LocalLoginSucceeded(connection); |
| 26 | 28 |
| 27 done->Run(); | 29 done->Run(); |
| 28 delete done; | 30 delete done; |
| 29 } | 31 } |
| 30 | 32 |
| 31 } // namespace remoting | 33 } // namespace remoting |
| OLD | NEW |