| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/input_event_tracker.h" | 5 #include "remoting/protocol/input_event_tracker.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "remoting/proto/event.pb.h" | 8 #include "remoting/proto/event.pb.h" |
| 9 | 9 |
| 10 namespace remoting { | 10 namespace remoting { |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 input_stub_->InjectTouchEvent(cancel_all_touch_event); | 64 input_stub_->InjectTouchEvent(cancel_all_touch_event); |
| 65 touch_point_ids_.clear(); | 65 touch_point_ids_.clear(); |
| 66 } | 66 } |
| 67 DCHECK(touch_point_ids_.empty()); | 67 DCHECK(touch_point_ids_.empty()); |
| 68 } | 68 } |
| 69 | 69 |
| 70 void InputEventTracker::ReleaseAllIfModifiersStuck(bool alt_expected, | 70 void InputEventTracker::ReleaseAllIfModifiersStuck(bool alt_expected, |
| 71 bool ctrl_expected, | 71 bool ctrl_expected, |
| 72 bool meta_expected, | 72 bool meta_expected, |
| 73 bool shift_expected) { | 73 bool shift_expected) { |
| 74 // See src/ui/events/keycodes/dom4/keycode_converter_data.h for these values. | 74 // See src/ui/events/keycodes/dom/keycode_converter_data.h for these values. |
| 75 bool alt_down = | 75 bool alt_down = |
| 76 pressed_keys_.find(0x0700e2) != pressed_keys_.end() || // Left | 76 pressed_keys_.find(0x0700e2) != pressed_keys_.end() || // Left |
| 77 pressed_keys_.find(0x0700e6) != pressed_keys_.end(); // Right | 77 pressed_keys_.find(0x0700e6) != pressed_keys_.end(); // Right |
| 78 bool ctrl_down = | 78 bool ctrl_down = |
| 79 pressed_keys_.find(0x0700e0) != pressed_keys_.end() || // Left | 79 pressed_keys_.find(0x0700e0) != pressed_keys_.end() || // Left |
| 80 pressed_keys_.find(0x0700e4) != pressed_keys_.end(); // Right | 80 pressed_keys_.find(0x0700e4) != pressed_keys_.end(); // Right |
| 81 bool meta_down = | 81 bool meta_down = |
| 82 pressed_keys_.find(0x0700e3) != pressed_keys_.end() || // Left | 82 pressed_keys_.find(0x0700e3) != pressed_keys_.end() || // Left |
| 83 pressed_keys_.find(0x0700e7) != pressed_keys_.end(); // Right | 83 pressed_keys_.find(0x0700e7) != pressed_keys_.end(); // Right |
| 84 bool shift_down = | 84 bool shift_down = |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 } | 151 } |
| 152 break; | 152 break; |
| 153 default: | 153 default: |
| 154 break; | 154 break; |
| 155 } | 155 } |
| 156 input_stub_->InjectTouchEvent(event); | 156 input_stub_->InjectTouchEvent(event); |
| 157 } | 157 } |
| 158 | 158 |
| 159 } // namespace protocol | 159 } // namespace protocol |
| 160 } // namespace remoting | 160 } // namespace remoting |
| OLD | NEW |