| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef CHROME_BROWSER_CHROMEOS_EVENTS_EVENT_REWRITER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_EVENTS_EVENT_REWRITER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_EVENTS_EVENT_REWRITER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_EVENTS_EVENT_REWRITER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 std::map<int, DeviceType> device_id_to_type_; | 172 std::map<int, DeviceType> device_id_to_type_; |
| 173 | 173 |
| 174 // The |source_device_id()| of the most recent keyboard event, | 174 // The |source_device_id()| of the most recent keyboard event, |
| 175 // used to interpret modifiers on pointer events. | 175 // used to interpret modifiers on pointer events. |
| 176 int last_keyboard_device_id_; | 176 int last_keyboard_device_id_; |
| 177 | 177 |
| 178 chromeos::input_method::ImeKeyboard* ime_keyboard_for_testing_; | 178 chromeos::input_method::ImeKeyboard* ime_keyboard_for_testing_; |
| 179 const PrefService* pref_service_for_testing_; | 179 const PrefService* pref_service_for_testing_; |
| 180 | 180 |
| 181 // The sticky keys controller is not owned here; | 181 // The sticky keys controller is not owned here; |
| 182 // at time of writing it is a singleton in ash::Shell> | 182 // at time of writing it is a singleton in ash::Shell. |
| 183 ash::StickyKeysController* sticky_keys_controller_; | 183 ash::StickyKeysController* sticky_keys_controller_; |
| 184 | 184 |
| 185 // The ChromeOS Diamond key arrives as F15. Since F15 is not a modifier, |
| 186 // we need to track its pressed state explicitly, and apply the selected |
| 187 // modifier flag to key and mouse presses that arrive while F15 is down. |
| 188 // While the Diamond key is down, this holds the corresponding modifier |
| 189 // ui::EventFlags; otherwise it is EF_NONE. |
| 190 int current_diamond_key_modifier_flags_; |
| 191 |
| 185 DISALLOW_COPY_AND_ASSIGN(EventRewriter); | 192 DISALLOW_COPY_AND_ASSIGN(EventRewriter); |
| 186 }; | 193 }; |
| 187 | 194 |
| 188 } // namespace chromeos | 195 } // namespace chromeos |
| 189 | 196 |
| 190 #endif // CHROME_BROWSER_CHROMEOS_EVENTS_EVENT_REWRITER_H_ | 197 #endif // CHROME_BROWSER_CHROMEOS_EVENTS_EVENT_REWRITER_H_ |
| OLD | NEW |