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

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

Issue 2658853003: Remove the deprecated Alt+Shift shortcut completely (Closed)
Patch Set: James' comments Created 3 years, 11 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
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
James Cook 2017/01/27 16:40:30 super nit: It -> it
afakhry 2017/01/27 17:27:41 Done.
169 // deprecated accelerator pre-handling.
170 // Returns true 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 false otherwise.
173 bool MaybeDeprecatedAcceleratorPressed(
174 AcceleratorAction action,
175 const ui::Accelerator& accelerator) const;
176
168 AcceleratorControllerDelegate* delegate_; 177 AcceleratorControllerDelegate* delegate_;
169 178
170 std::unique_ptr<ui::AcceleratorManager> accelerator_manager_; 179 std::unique_ptr<ui::AcceleratorManager> accelerator_manager_;
171 180
172 // A tracker for the current and previous accelerators. 181 // A tracker for the current and previous accelerators.
173 std::unique_ptr<ui::AcceleratorHistory> accelerator_history_; 182 std::unique_ptr<ui::AcceleratorHistory> accelerator_history_;
174 183
175 std::unique_ptr<ImeControlDelegate> ime_control_delegate_; 184 std::unique_ptr<ImeControlDelegate> ime_control_delegate_;
176 185
177 // Handles the exit accelerator which requires a double press to exit and 186 // 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_; 222 std::set<int> actions_needing_window_;
214 // Actions that can be performed without closing the menu (if one is present). 223 // Actions that can be performed without closing the menu (if one is present).
215 std::set<int> actions_keeping_menu_open_; 224 std::set<int> actions_keeping_menu_open_;
216 225
217 DISALLOW_COPY_AND_ASSIGN(AcceleratorController); 226 DISALLOW_COPY_AND_ASSIGN(AcceleratorController);
218 }; 227 };
219 228
220 } // namespace ash 229 } // namespace ash
221 230
222 #endif // ASH_COMMON_ACCELERATORS_ACCELERATOR_CONTROLLER_H_ 231 #endif // ASH_COMMON_ACCELERATORS_ACCELERATOR_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698