| 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 "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/system/chromeos/virtual_keyboard/virtual_keyboard_observer.h" | 8 #include "ash/system/chromeos/virtual_keyboard/virtual_keyboard_observer.h" |
| 9 #include "ash/test/ash_test_base.h" | 9 #include "ash/test/ash_test_base.h" |
| 10 #include "ash/wm/maximize_mode/maximize_mode_controller.h" | 10 #include "ash/wm/maximize_mode/maximize_mode_controller.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 manager->OnTouchscreenDevicesUpdated(touchscreen_devices); | 33 manager->OnTouchscreenDevicesUpdated(touchscreen_devices); |
| 34 } | 34 } |
| 35 | 35 |
| 36 void UpdateKeyboardDevices(std::vector<ui::KeyboardDevice> keyboard_devices) { | 36 void UpdateKeyboardDevices(std::vector<ui::KeyboardDevice> keyboard_devices) { |
| 37 ui::DeviceHotplugEventObserver* manager = | 37 ui::DeviceHotplugEventObserver* manager = |
| 38 ui::DeviceDataManager::GetInstance(); | 38 ui::DeviceDataManager::GetInstance(); |
| 39 manager->OnKeyboardDevicesUpdated(keyboard_devices); | 39 manager->OnKeyboardDevicesUpdated(keyboard_devices); |
| 40 } | 40 } |
| 41 | 41 |
| 42 void SetUp() override { | 42 void SetUp() override { |
| 43 CommandLine::ForCurrentProcess()->AppendSwitch( | 43 base::CommandLine::ForCurrentProcess()->AppendSwitch( |
| 44 keyboard::switches::kDisableSmartVirtualKeyboard); | 44 keyboard::switches::kDisableSmartVirtualKeyboard); |
| 45 AshTestBase::SetUp(); | 45 AshTestBase::SetUp(); |
| 46 UpdateKeyboardDevices(std::vector<ui::KeyboardDevice>()); | 46 UpdateKeyboardDevices(std::vector<ui::KeyboardDevice>()); |
| 47 UpdateTouchscreenDevices(std::vector<ui::TouchscreenDevice>()); | 47 UpdateTouchscreenDevices(std::vector<ui::TouchscreenDevice>()); |
| 48 } | 48 } |
| 49 | 49 |
| 50 private: | 50 private: |
| 51 DISALLOW_COPY_AND_ASSIGN(VirtualKeyboardControllerTest); | 51 DISALLOW_COPY_AND_ASSIGN(VirtualKeyboardControllerTest); |
| 52 }; | 52 }; |
| 53 | 53 |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 keyboards.push_back(ui::KeyboardDevice( | 197 keyboards.push_back(ui::KeyboardDevice( |
| 198 2, ui::InputDeviceType::INPUT_DEVICE_EXTERNAL, "keyboard")); | 198 2, ui::InputDeviceType::INPUT_DEVICE_EXTERNAL, "keyboard")); |
| 199 keyboards.push_back(ui::KeyboardDevice( | 199 keyboards.push_back(ui::KeyboardDevice( |
| 200 3, ui::InputDeviceType::INPUT_DEVICE_EXTERNAL, "keyboard")); | 200 3, ui::InputDeviceType::INPUT_DEVICE_EXTERNAL, "keyboard")); |
| 201 UpdateKeyboardDevices(keyboards); | 201 UpdateKeyboardDevices(keyboards); |
| 202 ASSERT_FALSE(keyboard::IsKeyboardEnabled()); | 202 ASSERT_FALSE(keyboard::IsKeyboardEnabled()); |
| 203 } | 203 } |
| 204 | 204 |
| 205 } // namespace test | 205 } // namespace test |
| 206 } // namespace ash | 206 } // namespace ash |
| OLD | NEW |