| 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/accelerators/accelerator_controller.h" | 5 #include "ash/accelerators/accelerator_controller.h" |
| 6 | 6 |
| 7 #include "ash/accelerators/accelerator_commands.h" | 7 #include "ash/accelerators/accelerator_commands.h" |
| 8 #include "ash/accelerators/accelerator_controller_delegate.h" | 8 #include "ash/accelerators/accelerator_controller_delegate.h" |
| 9 #include "ash/accelerators/debug_commands.h" | 9 #include "ash/accelerators/debug_commands.h" |
| 10 #include "ash/common/accessibility_delegate.h" | 10 #include "ash/common/accessibility_delegate.h" |
| (...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 632 delegate_->CanPerformAction(action, accelerator, previous_accelerator); | 632 delegate_->CanPerformAction(action, accelerator, previous_accelerator); |
| 633 } | 633 } |
| 634 | 634 |
| 635 void AcceleratorController::PerformAction(AcceleratorAction action, | 635 void AcceleratorController::PerformAction(AcceleratorAction action, |
| 636 const ui::Accelerator& accelerator) { | 636 const ui::Accelerator& accelerator) { |
| 637 AcceleratorProcessingRestriction restriction = | 637 AcceleratorProcessingRestriction restriction = |
| 638 GetAcceleratorProcessingRestriction(action); | 638 GetAcceleratorProcessingRestriction(action); |
| 639 if (restriction != RESTRICTION_NONE) | 639 if (restriction != RESTRICTION_NONE) |
| 640 return; | 640 return; |
| 641 | 641 |
| 642 LOG(ERROR) << action << "ACCELERATOR"; |
| 642 // If your accelerator invokes more than one line of code, please either | 643 // If your accelerator invokes more than one line of code, please either |
| 643 // implement it in your module's controller code or pull it into a HandleFoo() | 644 // implement it in your module's controller code or pull it into a HandleFoo() |
| 644 // function above. | 645 // function above. |
| 645 switch (action) { | 646 switch (action) { |
| 646 case CYCLE_BACKWARD_MRU: | 647 case CYCLE_BACKWARD_MRU: |
| 647 HandleCycleBackwardMRU(accelerator); | 648 HandleCycleBackwardMRU(accelerator); |
| 648 break; | 649 break; |
| 649 case CYCLE_FORWARD_MRU: | 650 case CYCLE_FORWARD_MRU: |
| 650 HandleCycleForwardMRU(accelerator); | 651 HandleCycleForwardMRU(accelerator); |
| 651 break; | 652 break; |
| (...skipping 175 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 |