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/client_session.h" | 5 #include "remoting/host/client_session.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/task.h" | 9 #include "base/task.h" |
10 #include "remoting/host/capturer.h" | 10 #include "remoting/host/capturer.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 capturer_(capturer), | 41 capturer_(capturer), |
42 authenticated_(false), | 42 authenticated_(false), |
43 awaiting_continue_approval_(false), | 43 awaiting_continue_approval_(false), |
44 remote_mouse_button_state_(0) { | 44 remote_mouse_button_state_(0) { |
45 } | 45 } |
46 | 46 |
47 ClientSession::~ClientSession() { | 47 ClientSession::~ClientSession() { |
48 } | 48 } |
49 | 49 |
50 void ClientSession::BeginSessionRequest( | 50 void ClientSession::BeginSessionRequest( |
51 const protocol::LocalLoginCredentials* credentials, Task* done) { | 51 const protocol::LocalLoginCredentials* credentials, |
| 52 const base::Closure& done) { |
52 DCHECK(event_handler_); | 53 DCHECK(event_handler_); |
53 | 54 |
54 base::ScopedTaskRunner done_runner(done); | 55 base::ScopedClosureRunner done_runner(done); |
55 | 56 |
56 bool success = false; | 57 bool success = false; |
57 switch (credentials->type()) { | 58 switch (credentials->type()) { |
58 case protocol::PASSWORD: | 59 case protocol::PASSWORD: |
59 success = user_authenticator_->Authenticate(credentials->username(), | 60 success = user_authenticator_->Authenticate(credentials->username(), |
60 credentials->credential()); | 61 credentials->credential()); |
61 break; | 62 break; |
62 | 63 |
63 default: | 64 default: |
64 LOG(ERROR) << "Invalid credentials type " << credentials->type(); | 65 LOG(ERROR) << "Invalid credentials type " << credentials->type(); |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 mouse.set_y(remote_mouse_pos_.y()); | 217 mouse.set_y(remote_mouse_pos_.y()); |
217 mouse.set_button((MouseEvent::MouseButton)i); | 218 mouse.set_button((MouseEvent::MouseButton)i); |
218 mouse.set_button_down(false); | 219 mouse.set_button_down(false); |
219 input_stub_->InjectMouseEvent(mouse); | 220 input_stub_->InjectMouseEvent(mouse); |
220 } | 221 } |
221 } | 222 } |
222 remote_mouse_button_state_ = 0; | 223 remote_mouse_button_state_ = 0; |
223 } | 224 } |
224 | 225 |
225 } // namespace remoting | 226 } // namespace remoting |
OLD | NEW |