| 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/virtual_keyboard_controller.h" | 5 #include "ash/virtual_keyboard_controller.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "ash/system/chromeos/virtual_keyboard/virtual_keyboard_observer.h" | 10 #include "ash/system/chromeos/virtual_keyboard/virtual_keyboard_observer.h" |
| 11 #include "ash/test/ash_test_base.h" | 11 #include "ash/test/ash_test_base.h" |
| 12 #include "ash/wm/maximize_mode/maximize_mode_controller.h" | 12 #include "ash/wm/maximize_mode/maximize_mode_controller.h" |
| 13 #include "ash/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard.h" | 13 #include "ash/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard.h" |
| 14 #include "base/command_line.h" | 14 #include "base/command_line.h" |
| 15 #include "ui/events/devices/device_data_manager.h" | 15 #include "ui/events/devices/device_data_manager.h" |
| 16 #include "ui/events/devices/device_hotplug_event_observer.h" | 16 #include "ui/events/devices/device_hotplug_event_observer.h" |
| 17 #include "ui/events/devices/input_device.h" | 17 #include "ui/events/devices/input_device.h" |
| 18 #include "ui/events/devices/keyboard_device.h" | 18 #include "ui/events/devices/keyboard_device.h" |
| 19 #include "ui/events/devices/touchscreen_device.h" | 19 #include "ui/events/devices/touchscreen_device.h" |
| 20 #include "ui/keyboard/keyboard_export.h" | 20 #include "ui/keyboard/keyboard_export.h" |
| 21 #include "ui/keyboard/keyboard_switches.h" | 21 #include "ui/keyboard/keyboard_switches.h" |
| 22 #include "ui/keyboard/keyboard_util.h" | 22 #include "ui/keyboard/keyboard_util.h" |
| 23 | 23 |
| 24 namespace ash { | 24 namespace ash { |
| 25 namespace test { | 25 namespace test { |
| 26 | 26 |
| 27 class VirtualKeyboardControllerTest : public AshTestBase { | 27 class VirtualKeyboardControllerTest : public AshTestBase { |
| 28 public: | 28 public: |
| 29 VirtualKeyboardControllerTest() {} | 29 VirtualKeyboardControllerTest() {} |
| 30 virtual ~VirtualKeyboardControllerTest() {} | 30 ~VirtualKeyboardControllerTest() override {} |
| 31 | 31 |
| 32 void UpdateTouchscreenDevices( | 32 void UpdateTouchscreenDevices( |
| 33 std::vector<ui::TouchscreenDevice> touchscreen_devices) { | 33 std::vector<ui::TouchscreenDevice> touchscreen_devices) { |
| 34 ui::DeviceHotplugEventObserver* manager = | 34 ui::DeviceHotplugEventObserver* manager = |
| 35 ui::DeviceDataManager::GetInstance(); | 35 ui::DeviceDataManager::GetInstance(); |
| 36 manager->OnTouchscreenDevicesUpdated(touchscreen_devices); | 36 manager->OnTouchscreenDevicesUpdated(touchscreen_devices); |
| 37 } | 37 } |
| 38 | 38 |
| 39 void UpdateKeyboardDevices(std::vector<ui::KeyboardDevice> keyboard_devices) { | 39 void UpdateKeyboardDevices(std::vector<ui::KeyboardDevice> keyboard_devices) { |
| 40 ui::DeviceHotplugEventObserver* manager = | 40 ui::DeviceHotplugEventObserver* manager = |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 keyboards.push_back(ui::KeyboardDevice( | 232 keyboards.push_back(ui::KeyboardDevice( |
| 233 2, ui::InputDeviceType::INPUT_DEVICE_EXTERNAL, "keyboard")); | 233 2, ui::InputDeviceType::INPUT_DEVICE_EXTERNAL, "keyboard")); |
| 234 keyboards.push_back(ui::KeyboardDevice( | 234 keyboards.push_back(ui::KeyboardDevice( |
| 235 3, ui::InputDeviceType::INPUT_DEVICE_EXTERNAL, "keyboard")); | 235 3, ui::InputDeviceType::INPUT_DEVICE_EXTERNAL, "keyboard")); |
| 236 UpdateKeyboardDevices(keyboards); | 236 UpdateKeyboardDevices(keyboards); |
| 237 ASSERT_FALSE(keyboard::IsKeyboardEnabled()); | 237 ASSERT_FALSE(keyboard::IsKeyboardEnabled()); |
| 238 } | 238 } |
| 239 | 239 |
| 240 } // namespace test | 240 } // namespace test |
| 241 } // namespace ash | 241 } // namespace ash |
| OLD | NEW |