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

Unified Diff: ui/events/devices/device_data_manager.cc

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
« no previous file with comments | « ui/events/devices/device_data_manager.h ('k') | ui/events/devices/input_device.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/devices/device_data_manager.cc
diff --git a/ui/events/devices/device_data_manager.cc b/ui/events/devices/device_data_manager.cc
index 2bdbac9847424c6533133f812afa04285b5a7ac3..628813a8905dfdddec07dd946af5c796cf85cfaf 100644
--- a/ui/events/devices/device_data_manager.cc
+++ b/ui/events/devices/device_data_manager.cc
@@ -70,13 +70,13 @@ void DeviceDataManager::ClearTouchDeviceAssociations() {
}
bool DeviceDataManager::IsTouchDeviceIdValid(
- unsigned int touch_device_id) const {
+ int touch_device_id) const {
return (touch_device_id > 0 && touch_device_id < kMaxDeviceNum);
}
void DeviceDataManager::UpdateTouchInfoForDisplay(
int64_t target_display_id,
- unsigned int touch_device_id,
+ int touch_device_id,
const gfx::Transform& touch_transformer) {
if (IsTouchDeviceIdValid(touch_device_id)) {
touch_device_to_target_display_map_[touch_device_id] = target_display_id;
@@ -84,19 +84,19 @@ void DeviceDataManager::UpdateTouchInfoForDisplay(
}
}
-void DeviceDataManager::UpdateTouchRadiusScale(unsigned int touch_device_id,
+void DeviceDataManager::UpdateTouchRadiusScale(int touch_device_id,
double scale) {
if (IsTouchDeviceIdValid(touch_device_id))
touch_radius_scale_map_[touch_device_id] = scale;
}
-void DeviceDataManager::ApplyTouchRadiusScale(unsigned int touch_device_id,
+void DeviceDataManager::ApplyTouchRadiusScale(int touch_device_id,
double* radius) {
if (IsTouchDeviceIdValid(touch_device_id))
*radius = (*radius) * touch_radius_scale_map_[touch_device_id];
}
-void DeviceDataManager::ApplyTouchTransformer(unsigned int touch_device_id,
+void DeviceDataManager::ApplyTouchTransformer(int touch_device_id,
float* x,
float* y) {
if (IsTouchDeviceIdValid(touch_device_id)) {
@@ -110,7 +110,7 @@ void DeviceDataManager::ApplyTouchTransformer(unsigned int touch_device_id,
}
int64_t DeviceDataManager::GetTargetDisplayForTouchDevice(
- unsigned int touch_device_id) const {
+ int touch_device_id) const {
if (IsTouchDeviceIdValid(touch_device_id))
return touch_device_to_target_display_map_[touch_device_id];
return gfx::Display::kInvalidDisplayID;
« no previous file with comments | « ui/events/devices/device_data_manager.h ('k') | ui/events/devices/input_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698