| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/common/accelerators/accelerator_controller.h" | 5 #include "ash/common/accelerators/accelerator_controller.h" |
| 6 | 6 |
| 7 #include "ash/aura/wm_window_aura.h" | 7 #include "ash/aura/wm_window_aura.h" |
| 8 #include "ash/common/accelerators/accelerator_table.h" | 8 #include "ash/common/accelerators/accelerator_table.h" |
| 9 #include "ash/common/accessibility_delegate.h" | 9 #include "ash/common/accessibility_delegate.h" |
| 10 #include "ash/common/accessibility_types.h" | 10 #include "ash/common/accessibility_types.h" |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 void SetKeyboardBrightnessControlDelegate( | 271 void SetKeyboardBrightnessControlDelegate( |
| 272 std::unique_ptr<KeyboardBrightnessControlDelegate> delegate) { | 272 std::unique_ptr<KeyboardBrightnessControlDelegate> delegate) { |
| 273 WmShell::Get()->keyboard_brightness_control_delegate_ = std::move(delegate); | 273 WmShell::Get()->keyboard_brightness_control_delegate_ = std::move(delegate); |
| 274 } | 274 } |
| 275 | 275 |
| 276 private: | 276 private: |
| 277 DISALLOW_COPY_AND_ASSIGN(AcceleratorControllerTest); | 277 DISALLOW_COPY_AND_ASSIGN(AcceleratorControllerTest); |
| 278 }; | 278 }; |
| 279 | 279 |
| 280 AcceleratorController* AcceleratorControllerTest::GetController() { | 280 AcceleratorController* AcceleratorControllerTest::GetController() { |
| 281 return Shell::GetInstance()->accelerator_controller(); | 281 return WmShell::Get()->accelerator_controller(); |
| 282 } | 282 } |
| 283 | 283 |
| 284 #if !defined(OS_WIN) | 284 #if !defined(OS_WIN) |
| 285 // Double press of exit shortcut => exiting | 285 // Double press of exit shortcut => exiting |
| 286 TEST_F(AcceleratorControllerTest, ExitWarningHandlerTestDoublePress) { | 286 TEST_F(AcceleratorControllerTest, ExitWarningHandlerTestDoublePress) { |
| 287 ui::Accelerator press(ui::VKEY_Q, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN); | 287 ui::Accelerator press(ui::VKEY_Q, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN); |
| 288 ui::Accelerator release(press); | 288 ui::Accelerator release(press); |
| 289 release.set_type(ui::ET_KEY_RELEASED); | 289 release.set_type(ui::ET_KEY_RELEASED); |
| 290 ExitWarningHandler* ewh = GetController()->GetExitWarningHandlerForTest(); | 290 ExitWarningHandler* ewh = GetController()->GetExitWarningHandlerForTest(); |
| 291 ASSERT_TRUE(ewh); | 291 ASSERT_TRUE(ewh); |
| (...skipping 1119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1411 EXPECT_TRUE(IsMessageCenterEmpty()); | 1411 EXPECT_TRUE(IsMessageCenterEmpty()); |
| 1412 | 1412 |
| 1413 // If the action is LOCK_SCREEN, we must reset the state by unlocking the | 1413 // If the action is LOCK_SCREEN, we must reset the state by unlocking the |
| 1414 // screen before we proceed testing the rest of accelerators. | 1414 // screen before we proceed testing the rest of accelerators. |
| 1415 ResetStateIfNeeded(); | 1415 ResetStateIfNeeded(); |
| 1416 } | 1416 } |
| 1417 } | 1417 } |
| 1418 #endif // defined(OS_CHROMEOS) | 1418 #endif // defined(OS_CHROMEOS) |
| 1419 | 1419 |
| 1420 } // namespace ash | 1420 } // namespace ash |
| OLD | NEW |