| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 1115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1126 // be passed to the modal window. This is important for things like | 1126 // be passed to the modal window. This is important for things like |
| 1127 // Alt+Tab that would cause an undesired effect in the modal window by | 1127 // Alt+Tab that would cause an undesired effect in the modal window by |
| 1128 // cycling through its window elements. | 1128 // cycling through its window elements. |
| 1129 return RESTRICTION_PREVENT_PROCESSING_AND_PROPAGATION; | 1129 return RESTRICTION_PREVENT_PROCESSING_AND_PROPAGATION; |
| 1130 } | 1130 } |
| 1131 if (shell->delegate()->IsRunningInForcedAppMode() && | 1131 if (shell->delegate()->IsRunningInForcedAppMode() && |
| 1132 actions_allowed_in_app_mode_.find(action) == | 1132 actions_allowed_in_app_mode_.find(action) == |
| 1133 actions_allowed_in_app_mode_.end()) { | 1133 actions_allowed_in_app_mode_.end()) { |
| 1134 return RESTRICTION_PREVENT_PROCESSING; | 1134 return RESTRICTION_PREVENT_PROCESSING; |
| 1135 } | 1135 } |
| 1136 if (MruWindowTracker::BuildWindowList().empty() && | 1136 if (MruWindowTracker::BuildWindowList(false).empty() && |
| 1137 actions_needing_window_.find(action) != actions_needing_window_.end()) { | 1137 actions_needing_window_.find(action) != actions_needing_window_.end()) { |
| 1138 Shell::GetInstance()->accessibility_delegate()->TriggerAccessibilityAlert( | 1138 Shell::GetInstance()->accessibility_delegate()->TriggerAccessibilityAlert( |
| 1139 ui::A11Y_ALERT_WINDOW_NEEDED); | 1139 ui::A11Y_ALERT_WINDOW_NEEDED); |
| 1140 return RESTRICTION_PREVENT_PROCESSING_AND_PROPAGATION; | 1140 return RESTRICTION_PREVENT_PROCESSING_AND_PROPAGATION; |
| 1141 } | 1141 } |
| 1142 return RESTRICTION_NONE; | 1142 return RESTRICTION_NONE; |
| 1143 } | 1143 } |
| 1144 | 1144 |
| 1145 void AcceleratorController::SetKeyboardBrightnessControlDelegate( | 1145 void AcceleratorController::SetKeyboardBrightnessControlDelegate( |
| 1146 scoped_ptr<KeyboardBrightnessControlDelegate> | 1146 scoped_ptr<KeyboardBrightnessControlDelegate> |
| 1147 keyboard_brightness_control_delegate) { | 1147 keyboard_brightness_control_delegate) { |
| 1148 keyboard_brightness_control_delegate_ = | 1148 keyboard_brightness_control_delegate_ = |
| 1149 keyboard_brightness_control_delegate.Pass(); | 1149 keyboard_brightness_control_delegate.Pass(); |
| 1150 } | 1150 } |
| 1151 | 1151 |
| 1152 } // namespace ash | 1152 } // namespace ash |
| OLD | NEW |