| 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/common/accelerators/accelerator_commands.h" | 7 #include "ash/common/accelerators/accelerator_commands.h" |
| 8 #include "ash/common/accelerators/accelerator_controller_delegate.h" | 8 #include "ash/common/accelerators/accelerator_controller_delegate.h" |
| 9 #include "ash/common/accelerators/debug_commands.h" | 9 #include "ash/common/accelerators/debug_commands.h" |
| 10 #include "ash/common/accessibility_delegate.h" | 10 #include "ash/common/accessibility_delegate.h" |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 } | 321 } |
| 322 | 322 |
| 323 #endif // defined(OS_CHROMEOS) | 323 #endif // defined(OS_CHROMEOS) |
| 324 | 324 |
| 325 } // namespace | 325 } // namespace |
| 326 | 326 |
| 327 //////////////////////////////////////////////////////////////////////////////// | 327 //////////////////////////////////////////////////////////////////////////////// |
| 328 // AcceleratorController, public: | 328 // AcceleratorController, public: |
| 329 | 329 |
| 330 AcceleratorController::AcceleratorController( | 330 AcceleratorController::AcceleratorController( |
| 331 AcceleratorControllerDelegate* delegate) | 331 AcceleratorControllerDelegate* delegate, |
| 332 ui::AcceleratorManagerDelegate* manager_delegate) |
| 332 : delegate_(delegate), | 333 : delegate_(delegate), |
| 333 accelerator_manager_(new ui::AcceleratorManager), | 334 accelerator_manager_(new ui::AcceleratorManager(manager_delegate)), |
| 334 accelerator_history_(new ui::AcceleratorHistory) { | 335 accelerator_history_(new ui::AcceleratorHistory) { |
| 335 Init(); | 336 Init(); |
| 336 } | 337 } |
| 337 | 338 |
| 338 AcceleratorController::~AcceleratorController() {} | 339 AcceleratorController::~AcceleratorController() {} |
| 339 | 340 |
| 340 void AcceleratorController::Register(const ui::Accelerator& accelerator, | 341 void AcceleratorController::Register(const ui::Accelerator& accelerator, |
| 341 ui::AcceleratorTarget* target) { | 342 ui::AcceleratorTarget* target) { |
| 342 accelerator_manager_->Register( | 343 accelerator_manager_->Register( |
| 343 accelerator, ui::AcceleratorManager::kNormalPriority, target); | 344 accelerator, ui::AcceleratorManager::kNormalPriority, target); |
| (...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 827 if (wm_shell->mru_window_tracker()->BuildMruWindowList().empty() && | 828 if (wm_shell->mru_window_tracker()->BuildMruWindowList().empty() && |
| 828 actions_needing_window_.find(action) != actions_needing_window_.end()) { | 829 actions_needing_window_.find(action) != actions_needing_window_.end()) { |
| 829 wm_shell->accessibility_delegate()->TriggerAccessibilityAlert( | 830 wm_shell->accessibility_delegate()->TriggerAccessibilityAlert( |
| 830 A11Y_ALERT_WINDOW_NEEDED); | 831 A11Y_ALERT_WINDOW_NEEDED); |
| 831 return RESTRICTION_PREVENT_PROCESSING_AND_PROPAGATION; | 832 return RESTRICTION_PREVENT_PROCESSING_AND_PROPAGATION; |
| 832 } | 833 } |
| 833 return RESTRICTION_NONE; | 834 return RESTRICTION_NONE; |
| 834 } | 835 } |
| 835 | 836 |
| 836 } // namespace ash | 837 } // namespace ash |
| OLD | NEW |