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

Unified Diff: ash/accelerators/accelerator_controller.h

Issue 729993002: Alphabetise AcceleratorController::PerformAction() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@nested_dispatch0
Patch Set: Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ash/accelerators/accelerator_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/accelerators/accelerator_controller.h
diff --git a/ash/accelerators/accelerator_controller.h b/ash/accelerators/accelerator_controller.h
index 79877ad0d68309fb58fc568c59dfc0fcb1be4a89..0ca515b3fc36edadc8c9089f90ee469e1170bb47 100644
--- a/ash/accelerators/accelerator_controller.h
+++ b/ash/accelerators/accelerator_controller.h
@@ -8,6 +8,7 @@
#include <map>
#include <set>
+#include "ash/accelerators/accelerator_table.h"
#include "ash/accelerators/exit_warning_handler.h"
#include "ash/ash_export.h"
#include "base/basictypes.h"
@@ -88,15 +89,11 @@ class ASH_EXPORT AcceleratorController : public ui::AcceleratorTarget {
// Performs the specified action if it is enabled. Returns whether the action
// was performed successfully.
- bool PerformActionIfEnabled(int action);
+ bool PerformActionIfEnabled(AcceleratorAction action);
// Returns the restriction for the current context.
AcceleratorProcessingRestriction GetCurrentAcceleratorRestriction();
- // Overridden from ui::AcceleratorTarget:
- bool AcceleratorPressed(const ui::Accelerator& accelerator) override;
- bool CanHandleAccelerators() const override;
-
void SetBrightnessControlDelegate(
scoped_ptr<BrightnessControlDelegate> brightness_control_delegate);
void SetImeControlDelegate(
@@ -119,6 +116,10 @@ class ASH_EXPORT AcceleratorController : public ui::AcceleratorTarget {
return previous_accelerator_;
}
+ // Overridden from ui::AcceleratorTarget:
+ bool AcceleratorPressed(const ui::Accelerator& accelerator) override;
+ bool CanHandleAccelerators() const override;
+
private:
FRIEND_TEST_ALL_PREFIXES(AcceleratorControllerTest, GlobalAccelerators);
FRIEND_TEST_ALL_PREFIXES(AcceleratorControllerTest,
@@ -134,7 +135,7 @@ class ASH_EXPORT AcceleratorController : public ui::AcceleratorTarget {
// Performs the specified action. The |accelerator| may provide additional
// data the action needs. Returns whether an action was performed
// successfully.
- bool PerformAction(int action,
+ bool PerformAction(AcceleratorAction action,
const ui::Accelerator& accelerator);
// Get the accelerator restriction for the given action. Supply an |action|
@@ -166,7 +167,7 @@ class ASH_EXPORT AcceleratorController : public ui::AcceleratorTarget {
// A map from accelerators to the AcceleratorAction values, which are used in
// the implementation.
- std::map<ui::Accelerator, int> accelerators_;
+ std::map<ui::Accelerator, AcceleratorAction> accelerators_;
// Actions allowed when the user is not signed in.
std::set<int> actions_allowed_at_login_screen_;
« no previous file with comments | « no previous file | ash/accelerators/accelerator_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698