Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Side by Side Diff: ui/events/ozone/evdev/input_device_factory_evdev.h

Issue 1048333005: ozone: Map TouchEvent::touch_id_ into expected range (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 UI_EVENTS_OZONE_EVDEV_INPUT_DEVICE_FACTORY_EVDEV_H_ 5 #ifndef UI_EVENTS_OZONE_EVDEV_INPUT_DEVICE_FACTORY_EVDEV_H_
6 #define UI_EVENTS_OZONE_EVDEV_INPUT_DEVICE_FACTORY_EVDEV_H_ 6 #define UI_EVENTS_OZONE_EVDEV_INPUT_DEVICE_FACTORY_EVDEV_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 // Open device at path & starting processing events (on UI thread). 78 // Open device at path & starting processing events (on UI thread).
79 void AttachInputDevice(scoped_ptr<EventConverterEvdev> converter); 79 void AttachInputDevice(scoped_ptr<EventConverterEvdev> converter);
80 80
81 // Close device at path (on UI thread). 81 // Close device at path (on UI thread).
82 void DetachInputDevice(const base::FilePath& file_path); 82 void DetachInputDevice(const base::FilePath& file_path);
83 83
84 // Sync input_device_settings_ to attached devices. 84 // Sync input_device_settings_ to attached devices.
85 void ApplyInputDeviceSettings(); 85 void ApplyInputDeviceSettings();
86 void ApplyCapsLockLed(); 86 void ApplyCapsLockLed();
87 87
88 // An offset must be applied to make the touch_id of events globally unique.
89 void ApplyTouchIdOffset(EventConverterEvdev* converter);
90
88 // Update observers on device changes. 91 // Update observers on device changes.
89 void UpdateDirtyFlags(const EventConverterEvdev* converter); 92 void UpdateDirtyFlags(const EventConverterEvdev* converter);
90 void NotifyDevicesUpdated(); 93 void NotifyDevicesUpdated();
91 void NotifyKeyboardsUpdated(); 94 void NotifyKeyboardsUpdated();
92 void NotifyTouchscreensUpdated(); 95 void NotifyTouchscreensUpdated();
93 void NotifyMouseDevicesUpdated(); 96 void NotifyMouseDevicesUpdated();
94 void NotifyTouchpadDevicesUpdated(); 97 void NotifyTouchpadDevicesUpdated();
95 98
96 void SetIntPropertyForOneType(const EventDeviceType type, 99 void SetIntPropertyForOneType(const EventDeviceType type,
97 const std::string& name, 100 const std::string& name,
(...skipping 22 matching lines...) Expand all
120 // Number of pending device additions & device classes. 123 // Number of pending device additions & device classes.
121 int pending_device_changes_; 124 int pending_device_changes_;
122 bool touchscreen_list_dirty_; 125 bool touchscreen_list_dirty_;
123 bool keyboard_list_dirty_; 126 bool keyboard_list_dirty_;
124 bool mouse_list_dirty_; 127 bool mouse_list_dirty_;
125 bool touchpad_list_dirty_; 128 bool touchpad_list_dirty_;
126 129
127 // LEDs. 130 // LEDs.
128 bool caps_lock_led_enabled_; 131 bool caps_lock_led_enabled_;
129 132
133 // Next offset to use for touch id manipulation.
134 int next_touch_id_offset_;
135
130 // Device settings. These primarily affect libgestures behavior. 136 // Device settings. These primarily affect libgestures behavior.
131 InputDeviceSettingsEvdev input_device_settings_; 137 InputDeviceSettingsEvdev input_device_settings_;
132 138
133 // Support weak pointers for attach & detach callbacks. 139 // Support weak pointers for attach & detach callbacks.
134 base::WeakPtrFactory<InputDeviceFactoryEvdev> weak_ptr_factory_; 140 base::WeakPtrFactory<InputDeviceFactoryEvdev> weak_ptr_factory_;
135 141
136 DISALLOW_COPY_AND_ASSIGN(InputDeviceFactoryEvdev); 142 DISALLOW_COPY_AND_ASSIGN(InputDeviceFactoryEvdev);
137 }; 143 };
138 144
139 } // namespace ui 145 } // namespace ui
140 146
141 #endif // UI_EVENTS_OZONE_EVDEV_INPUT_DEVICE_FACTORY_EVDEV_H_ 147 #endif // UI_EVENTS_OZONE_EVDEV_INPUT_DEVICE_FACTORY_EVDEV_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698