| 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 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 valuators[i].value); | 284 valuators[i].value); |
| 285 } | 285 } |
| 286 } | 286 } |
| 287 | 287 |
| 288 void SetUpTouchPadForTest(int deviceid) { | 288 void SetUpTouchPadForTest(int deviceid) { |
| 289 std::vector<int> device_list; | 289 std::vector<int> device_list; |
| 290 device_list.push_back(deviceid); | 290 device_list.push_back(deviceid); |
| 291 | 291 |
| 292 TouchFactory::GetInstance()->SetPointerDeviceForTest(device_list); | 292 TouchFactory::GetInstance()->SetPointerDeviceForTest(device_list); |
| 293 ui::DeviceDataManagerX11* manager = ui::DeviceDataManagerX11::GetInstance(); | 293 ui::DeviceDataManagerX11* manager = ui::DeviceDataManagerX11::GetInstance(); |
| 294 manager->SetDeviceListForTest(std::vector<int>(), device_list); | 294 manager->SetDeviceListForTest(std::vector<int>(), device_list, |
| 295 std::vector<int>()); |
| 295 } | 296 } |
| 296 | 297 |
| 297 void SetUpTouchDevicesForTest(const std::vector<int>& devices) { | 298 void SetUpTouchDevicesForTest(const std::vector<int>& devices) { |
| 298 TouchFactory::GetInstance()->SetTouchDeviceForTest(devices); | 299 TouchFactory::GetInstance()->SetTouchDeviceForTest(devices); |
| 299 ui::DeviceDataManagerX11* manager = ui::DeviceDataManagerX11::GetInstance(); | 300 ui::DeviceDataManagerX11* manager = ui::DeviceDataManagerX11::GetInstance(); |
| 300 manager->SetDeviceListForTest(devices, std::vector<int>()); | 301 manager->SetDeviceListForTest(devices, std::vector<int>(), |
| 302 std::vector<int>()); |
| 303 } |
| 304 |
| 305 void SetUpPointerDevicesForTest(const std::vector<int>& devices) { |
| 306 TouchFactory::GetInstance()->SetPointerDeviceForTest(devices); |
| 307 ui::DeviceDataManagerX11* manager = ui::DeviceDataManagerX11::GetInstance(); |
| 308 manager->SetDeviceListForTest(std::vector<int>(), std::vector<int>(), |
| 309 devices); |
| 301 } | 310 } |
| 302 | 311 |
| 303 } // namespace ui | 312 } // namespace ui |
| OLD | NEW |