| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "ui/events/test/events_test_utils_x11.h" | 5 #include "ui/events/test/events_test_utils_x11.h" |
| 6 | 6 |
| 7 #include <X11/extensions/XI2.h> | 7 #include <X11/extensions/XI2.h> |
| 8 #include <X11/keysym.h> | 8 #include <X11/keysym.h> |
| 9 #include <X11/X.h> | 9 #include <X11/X.h> |
| 10 #include <X11/Xlib.h> | 10 #include <X11/Xlib.h> |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 CHECK_EQ(GenericEvent, event_->type); | 279 CHECK_EQ(GenericEvent, event_->type); |
| 280 XIDeviceEvent* xiev = static_cast<XIDeviceEvent*>(event_->xcookie.data); | 280 XIDeviceEvent* xiev = static_cast<XIDeviceEvent*>(event_->xcookie.data); |
| 281 InitValuatorsForXIDeviceEvent(xiev); | 281 InitValuatorsForXIDeviceEvent(xiev); |
| 282 ui::DeviceDataManagerX11* manager = ui::DeviceDataManagerX11::GetInstance(); | 282 ui::DeviceDataManagerX11* manager = ui::DeviceDataManagerX11::GetInstance(); |
| 283 for (size_t i = 0; i < valuators.size(); ++i) { | 283 for (size_t i = 0; i < valuators.size(); ++i) { |
| 284 manager->SetValuatorDataForTest(xiev, valuators[i].data_type, | 284 manager->SetValuatorDataForTest(xiev, valuators[i].data_type, |
| 285 valuators[i].value); | 285 valuators[i].value); |
| 286 } | 286 } |
| 287 } | 287 } |
| 288 | 288 |
| 289 void SetUpTouchPadForTest(unsigned int deviceid) { | 289 void SetUpTouchPadForTest(int deviceid) { |
| 290 std::vector<unsigned int> device_list; | 290 std::vector<int> device_list; |
| 291 device_list.push_back(deviceid); | 291 device_list.push_back(deviceid); |
| 292 | 292 |
| 293 TouchFactory::GetInstance()->SetPointerDeviceForTest(device_list); | 293 TouchFactory::GetInstance()->SetPointerDeviceForTest(device_list); |
| 294 ui::DeviceDataManagerX11* manager = ui::DeviceDataManagerX11::GetInstance(); | 294 ui::DeviceDataManagerX11* manager = ui::DeviceDataManagerX11::GetInstance(); |
| 295 manager->SetDeviceListForTest(std::vector<unsigned int>(), device_list); | 295 manager->SetDeviceListForTest(std::vector<int>(), device_list); |
| 296 } | 296 } |
| 297 | 297 |
| 298 void SetUpTouchDevicesForTest(const std::vector<unsigned int>& devices) { | 298 void SetUpTouchDevicesForTest(const std::vector<int>& devices) { |
| 299 TouchFactory::GetInstance()->SetTouchDeviceForTest(devices); | 299 TouchFactory::GetInstance()->SetTouchDeviceForTest(devices); |
| 300 ui::DeviceDataManagerX11* manager = ui::DeviceDataManagerX11::GetInstance(); | 300 ui::DeviceDataManagerX11* manager = ui::DeviceDataManagerX11::GetInstance(); |
| 301 manager->SetDeviceListForTest(devices, std::vector<unsigned int>()); | 301 manager->SetDeviceListForTest(devices, std::vector<int>()); |
| 302 } | 302 } |
| 303 | 303 |
| 304 } // namespace ui | 304 } // namespace ui |
| OLD | NEW |