| 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/message_loop_proxy.h" | 9 #include "base/message_loop_proxy.h" |
| 10 #include "remoting/host/capturer.h" | 10 #include "remoting/host/capturer.h" |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 key.set_keycode(*i); | 232 key.set_keycode(*i); |
| 233 key.set_pressed(false); | 233 key.set_pressed(false); |
| 234 input_stub_->InjectKeyEvent(key); | 234 input_stub_->InjectKeyEvent(key); |
| 235 } | 235 } |
| 236 pressed_keys_.clear(); | 236 pressed_keys_.clear(); |
| 237 | 237 |
| 238 // Undo any currently pressed mouse buttons. | 238 // Undo any currently pressed mouse buttons. |
| 239 for (int i = 1; i < MouseEvent::BUTTON_MAX; i++) { | 239 for (int i = 1; i < MouseEvent::BUTTON_MAX; i++) { |
| 240 if (remote_mouse_button_state_ & (1 << (i - 1))) { | 240 if (remote_mouse_button_state_ & (1 << (i - 1))) { |
| 241 MouseEvent mouse; | 241 MouseEvent mouse; |
| 242 // TODO(wez): Shouldn't [need to] set position here. |
| 242 mouse.set_x(remote_mouse_pos_.x()); | 243 mouse.set_x(remote_mouse_pos_.x()); |
| 243 mouse.set_y(remote_mouse_pos_.y()); | 244 mouse.set_y(remote_mouse_pos_.y()); |
| 244 mouse.set_button((MouseEvent::MouseButton)i); | 245 mouse.set_button((MouseEvent::MouseButton)i); |
| 245 mouse.set_button_down(false); | 246 mouse.set_button_down(false); |
| 246 input_stub_->InjectMouseEvent(mouse); | 247 input_stub_->InjectMouseEvent(mouse); |
| 247 } | 248 } |
| 248 } | 249 } |
| 249 remote_mouse_button_state_ = 0; | 250 remote_mouse_button_state_ = 0; |
| 250 } | 251 } |
| 251 | 252 |
| 252 } // namespace remoting | 253 } // namespace remoting |
| OLD | NEW |