| OLD | NEW |
| 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 #include "ash/test/virtual_keyboard_test_helper.h" | 5 #include "ash/test/virtual_keyboard_test_helper.h" |
| 6 | 6 |
| 7 #include "ui/events/devices/device_data_manager.h" | 7 #include "ui/events/devices/device_data_manager.h" |
| 8 #include "ui/events/devices/device_hotplug_event_observer.h" | 8 #include "ui/events/devices/device_hotplug_event_observer.h" |
| 9 #include "ui/events/devices/input_device.h" | 9 #include "ui/events/devices/input_device.h" |
| 10 #include "ui/events/devices/keyboard_device.h" | |
| 11 #include "ui/events/devices/touchscreen_device.h" | 10 #include "ui/events/devices/touchscreen_device.h" |
| 12 | 11 |
| 13 namespace ash { | 12 namespace ash { |
| 14 namespace test { | 13 namespace test { |
| 15 | 14 |
| 16 void VirtualKeyboardTestHelper::SuppressKeyboard() { | 15 void VirtualKeyboardTestHelper::SuppressKeyboard() { |
| 17 ui::DeviceHotplugEventObserver* manager = | 16 ui::DeviceHotplugEventObserver* manager = |
| 18 ui::DeviceDataManager::GetInstance(); | 17 ui::DeviceDataManager::GetInstance(); |
| 19 std::vector<ui::TouchscreenDevice> screens; | 18 std::vector<ui::TouchscreenDevice> screens; |
| 20 screens.push_back( | 19 screens.push_back( |
| 21 ui::TouchscreenDevice(1, ui::InputDeviceType::INPUT_DEVICE_INTERNAL, | 20 ui::TouchscreenDevice(1, ui::InputDeviceType::INPUT_DEVICE_INTERNAL, |
| 22 "Touchscreen", gfx::Size(1024, 768), 0)); | 21 "Touchscreen", gfx::Size(1024, 768), 0)); |
| 23 manager->OnTouchscreenDevicesUpdated(screens); | 22 manager->OnTouchscreenDevicesUpdated(screens); |
| 24 | 23 |
| 25 std::vector<ui::KeyboardDevice> keyboards; | 24 std::vector<ui::InputDevice> keyboards; |
| 26 keyboards.push_back(ui::KeyboardDevice( | 25 keyboards.push_back(ui::InputDevice( |
| 27 2, ui::InputDeviceType::INPUT_DEVICE_EXTERNAL, "keyboard")); | 26 2, ui::InputDeviceType::INPUT_DEVICE_EXTERNAL, "keyboard")); |
| 28 manager->OnKeyboardDevicesUpdated(keyboards); | 27 manager->OnKeyboardDevicesUpdated(keyboards); |
| 29 } | 28 } |
| 30 | 29 |
| 31 } // namespace test | 30 } // namespace test |
| 32 } // namespace ash | 31 } // namespace ash |
| OLD | NEW |