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

Unified Diff: ui/events/devices/x11/touch_factory_x11.h

Issue 1071193002: Change device IDs from unsigned to signed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: check for negative IDs 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 side-by-side diff with in-line comments
Download patch
Index: ui/events/devices/x11/touch_factory_x11.h
diff --git a/ui/events/devices/x11/touch_factory_x11.h b/ui/events/devices/x11/touch_factory_x11.h
index 775b496629ada69fb469d02ba10c62287e18a69b..146b2a607dd834d9909c6033f5944f67dca88996 100644
--- a/ui/events/devices/x11/touch_factory_x11.h
+++ b/ui/events/devices/x11/touch_factory_x11.h
@@ -49,14 +49,17 @@ class EVENTS_DEVICES_EXPORT TouchFactory {
// Keeps a list of touch devices so that it is possible to determine if a
// pointer event is a touch-event or a mouse-event. The list is reset each
// time this is called.
- void SetTouchDeviceList(const std::vector<unsigned int>& devices);
+ void SetTouchDeviceList(const std::vector<int>& devices);
+
+ // Is the device ID valid?
+ bool IsValidDevice(int deviceid) const;
// Is the device a touch-device?
- bool IsTouchDevice(unsigned int deviceid) const;
+ bool IsTouchDevice(int deviceid) const;
// Is the device a real multi-touch-device? (see doc. for |touch_device_list_|
// below for more explanation.)
- bool IsMultiTouchDevice(unsigned int deviceid) const;
+ bool IsMultiTouchDevice(int deviceid) const;
// Tries to find an existing slot ID mapping to tracking ID. Returns true
// if the slot is found and it is saved in |slot|, false if no such slot
@@ -84,12 +87,12 @@ class EVENTS_DEVICES_EXPORT TouchFactory {
// Sets up the device id in the list |devices| as multi-touch capable
// devices and enables touch events processing. This function is only
// for test purpose, and it does not query from X server.
- void SetTouchDeviceForTest(const std::vector<unsigned int>& devices);
+ void SetTouchDeviceForTest(const std::vector<int>& devices);
// Sets up the device id in the list |devices| as pointer devices.
// This function is only for test purpose, and it does not query from
// X server.
- void SetPointerDeviceForTest(const std::vector<unsigned int>& devices);
+ void SetPointerDeviceForTest(const std::vector<int>& devices);
private:
// Requirement for Singleton
« no previous file with comments | « ui/events/devices/x11/device_data_manager_x11_unittest.cc ('k') | ui/events/devices/x11/touch_factory_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698