| 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" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 } | 44 } |
| 45 | 45 |
| 46 // Sets the event blocker on the maximized window controller. | 46 // Sets the event blocker on the maximized window controller. |
| 47 void SetEventBlocker( | 47 void SetEventBlocker( |
| 48 scoped_ptr<ScopedDisableInternalMouseAndKeyboard> blocker) { | 48 scoped_ptr<ScopedDisableInternalMouseAndKeyboard> blocker) { |
| 49 Shell::GetInstance()->maximize_mode_controller()->event_blocker_ = | 49 Shell::GetInstance()->maximize_mode_controller()->event_blocker_ = |
| 50 blocker.Pass(); | 50 blocker.Pass(); |
| 51 } | 51 } |
| 52 | 52 |
| 53 void SetUp() override { | 53 void SetUp() override { |
| 54 base::CommandLine::ForCurrentProcess()->AppendSwitchASCII( | 54 base::CommandLine::ForCurrentProcess()->AppendSwitch( |
| 55 keyboard::switches::kSmartVirtualKeyboard, "disabled"); | 55 keyboard::switches::kDisableSmartVirtualKeyboard); |
| 56 AshTestBase::SetUp(); | 56 AshTestBase::SetUp(); |
| 57 UpdateKeyboardDevices(std::vector<ui::KeyboardDevice>()); | 57 UpdateKeyboardDevices(std::vector<ui::KeyboardDevice>()); |
| 58 UpdateTouchscreenDevices(std::vector<ui::TouchscreenDevice>()); | 58 UpdateTouchscreenDevices(std::vector<ui::TouchscreenDevice>()); |
| 59 } | 59 } |
| 60 | 60 |
| 61 private: | 61 private: |
| 62 DISALLOW_COPY_AND_ASSIGN(VirtualKeyboardControllerTest); | 62 DISALLOW_COPY_AND_ASSIGN(VirtualKeyboardControllerTest); |
| 63 }; | 63 }; |
| 64 | 64 |
| 65 TEST_F(VirtualKeyboardControllerTest, EnabledDuringMaximizeMode) { | 65 TEST_F(VirtualKeyboardControllerTest, EnabledDuringMaximizeMode) { |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 UpdateTouchscreenDevices(screens); | 339 UpdateTouchscreenDevices(screens); |
| 340 std::vector<ui::KeyboardDevice> keyboards; | 340 std::vector<ui::KeyboardDevice> keyboards; |
| 341 keyboards.push_back(ui::KeyboardDevice( | 341 keyboards.push_back(ui::KeyboardDevice( |
| 342 1, ui::InputDeviceType::INPUT_DEVICE_EXTERNAL, "keyboard")); | 342 1, ui::InputDeviceType::INPUT_DEVICE_EXTERNAL, "keyboard")); |
| 343 UpdateKeyboardDevices(keyboards); | 343 UpdateKeyboardDevices(keyboards); |
| 344 ASSERT_TRUE(keyboard::IsKeyboardEnabled()); | 344 ASSERT_TRUE(keyboard::IsKeyboardEnabled()); |
| 345 } | 345 } |
| 346 | 346 |
| 347 } // namespace test | 347 } // namespace test |
| 348 } // namespace ash | 348 } // namespace ash |
| OLD | NEW |