Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(324)

Side by Side Diff: ash/common/accelerators/accelerator_controller.h

Issue 2658853003: Remove the deprecated Alt+Shift shortcut completely (Closed)
Patch Set: More comments Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/ash_chromeos_strings.grdp ('k') | ash/common/accelerators/accelerator_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef ASH_COMMON_ACCELERATORS_ACCELERATOR_CONTROLLER_H_ 5 #ifndef ASH_COMMON_ACCELERATORS_ACCELERATOR_CONTROLLER_H_
6 #define ASH_COMMON_ACCELERATORS_ACCELERATOR_CONTROLLER_H_ 6 #define ASH_COMMON_ACCELERATORS_ACCELERATOR_CONTROLLER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 const ui::Accelerator& accelerator); 158 const ui::Accelerator& accelerator);
159 159
160 // Returns whether performing |action| should consume the key event. 160 // Returns whether performing |action| should consume the key event.
161 bool ShouldActionConsumeKeyEvent(AcceleratorAction action); 161 bool ShouldActionConsumeKeyEvent(AcceleratorAction action);
162 162
163 // Get the accelerator restriction for the given action. Supply an |action| 163 // Get the accelerator restriction for the given action. Supply an |action|
164 // of -1 to get restrictions that apply for the current context. 164 // of -1 to get restrictions that apply for the current context.
165 AcceleratorProcessingRestriction GetAcceleratorProcessingRestriction( 165 AcceleratorProcessingRestriction GetAcceleratorProcessingRestriction(
166 int action); 166 int action);
167 167
168 // If |accelerator| is a deprecated accelerator, it performs the appropriate
169 // deprecated accelerator pre-handling.
170 // Returns PROCEED if the accelerator's action should be performed (i.e. if
171 // |accelerator| is not a deprecated accelerator, or it's an enabled
172 // deprecated accelerator), and STOP otherwise (if the accelerator is a
173 // disabled deprecated accelerator).
174 enum class AcceleratorProcessingStatus { PROCEED, STOP };
175 AcceleratorProcessingStatus MaybeDeprecatedAcceleratorPressed(
176 AcceleratorAction action,
177 const ui::Accelerator& accelerator) const;
178
168 AcceleratorControllerDelegate* delegate_; 179 AcceleratorControllerDelegate* delegate_;
169 180
170 std::unique_ptr<ui::AcceleratorManager> accelerator_manager_; 181 std::unique_ptr<ui::AcceleratorManager> accelerator_manager_;
171 182
172 // A tracker for the current and previous accelerators. 183 // A tracker for the current and previous accelerators.
173 std::unique_ptr<ui::AcceleratorHistory> accelerator_history_; 184 std::unique_ptr<ui::AcceleratorHistory> accelerator_history_;
174 185
175 std::unique_ptr<ImeControlDelegate> ime_control_delegate_; 186 std::unique_ptr<ImeControlDelegate> ime_control_delegate_;
176 187
177 // Handles the exit accelerator which requires a double press to exit and 188 // Handles the exit accelerator which requires a double press to exit and
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 std::set<int> actions_needing_window_; 224 std::set<int> actions_needing_window_;
214 // Actions that can be performed without closing the menu (if one is present). 225 // Actions that can be performed without closing the menu (if one is present).
215 std::set<int> actions_keeping_menu_open_; 226 std::set<int> actions_keeping_menu_open_;
216 227
217 DISALLOW_COPY_AND_ASSIGN(AcceleratorController); 228 DISALLOW_COPY_AND_ASSIGN(AcceleratorController);
218 }; 229 };
219 230
220 } // namespace ash 231 } // namespace ash
221 232
222 #endif // ASH_COMMON_ACCELERATORS_ACCELERATOR_CONTROLLER_H_ 233 #endif // ASH_COMMON_ACCELERATORS_ACCELERATOR_CONTROLLER_H_
OLDNEW
« no previous file with comments | « ash/ash_chromeos_strings.grdp ('k') | ash/common/accelerators/accelerator_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698