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/user_authenticator.h" | 10 #include "remoting/host/user_authenticator.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 using protocol::KeyEvent; | 26 using protocol::KeyEvent; |
27 | 27 |
28 ClientSession::ClientSession( | 28 ClientSession::ClientSession( |
29 EventHandler* event_handler, | 29 EventHandler* event_handler, |
30 UserAuthenticator* user_authenticator, | 30 UserAuthenticator* user_authenticator, |
31 scoped_refptr<protocol::ConnectionToClient> connection, | 31 scoped_refptr<protocol::ConnectionToClient> connection, |
32 protocol::InputStub* input_stub) | 32 protocol::InputStub* input_stub) |
33 : event_handler_(event_handler), | 33 : event_handler_(event_handler), |
34 user_authenticator_(user_authenticator), | 34 user_authenticator_(user_authenticator), |
35 connection_(connection), | 35 connection_(connection), |
| 36 client_jid_(connection->session()->jid()), |
36 input_stub_(input_stub), | 37 input_stub_(input_stub), |
37 authenticated_(false), | 38 authenticated_(false), |
38 awaiting_continue_approval_(false), | 39 awaiting_continue_approval_(false), |
39 remote_mouse_button_state_(0) { | 40 remote_mouse_button_state_(0) { |
40 } | 41 } |
41 | 42 |
42 ClientSession::~ClientSession() { | 43 ClientSession::~ClientSession() { |
43 } | 44 } |
44 | 45 |
45 void ClientSession::BeginSessionRequest( | 46 void ClientSession::BeginSessionRequest( |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 for (i = pressed_keys_.begin(); i != pressed_keys_.end(); ++i) { | 181 for (i = pressed_keys_.begin(); i != pressed_keys_.end(); ++i) { |
181 KeyEvent* key = new KeyEvent(); | 182 KeyEvent* key = new KeyEvent(); |
182 key->set_keycode(*i); | 183 key->set_keycode(*i); |
183 key->set_pressed(false); | 184 key->set_pressed(false); |
184 input_stub_->InjectKeyEvent(key, new DeleteTask<KeyEvent>(key)); | 185 input_stub_->InjectKeyEvent(key, new DeleteTask<KeyEvent>(key)); |
185 } | 186 } |
186 pressed_keys_.clear(); | 187 pressed_keys_.clear(); |
187 } | 188 } |
188 | 189 |
189 } // namespace remoting | 190 } // namespace remoting |
OLD | NEW |