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

Unified Diff: ash/common/accelerators/accelerator_controller.h

Issue 2769213005: Adds kWillProcessAccelerator_KeyEventProperty (Closed)
Patch Set: cleanup Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: ash/common/accelerators/accelerator_controller.h
diff --git a/ash/common/accelerators/accelerator_controller.h b/ash/common/accelerators/accelerator_controller.h
index 0a39c635b19f4386365b07c367ab15ebef41fc85..0f0252935f9da7ff72ab1609e8fc69e60f14aaf6 100644
--- a/ash/common/accelerators/accelerator_controller.h
+++ b/ash/common/accelerators/accelerator_controller.h
@@ -74,6 +74,9 @@ class ASH_EXPORT AcceleratorController
// Unregisters all keyboard accelerators for the specified target.
void UnregisterAll(ui::AcceleratorTarget* target);
+ // Returns true if there is an action for |accelerator| and it is enabled.
+ bool IsActionForAcceleratorEnabled(const ui::Accelerator& accelerator) const;
+
// Activates the target associated with the specified accelerator.
// First, AcceleratorPressed handler of the most recently registered target
// is called, and if that handler processes the event (i.e. returns true),
@@ -151,7 +154,7 @@ class ASH_EXPORT AcceleratorController
// Returns whether |action| can be performed. The |accelerator| may provide
// additional data the action needs.
bool CanPerformAction(AcceleratorAction action,
- const ui::Accelerator& accelerator);
+ const ui::Accelerator& accelerator) const;
// Performs the specified action. The |accelerator| may provide additional
// data the action needs.
@@ -164,7 +167,7 @@ class ASH_EXPORT AcceleratorController
// Get the accelerator restriction for the given action. Supply an |action|
// of -1 to get restrictions that apply for the current context.
AcceleratorProcessingRestriction GetAcceleratorProcessingRestriction(
- int action);
+ int action) const;
// If |accelerator| is a deprecated accelerator, it performs the appropriate
// deprecated accelerator pre-handling.

Powered by Google App Engine
This is Rietveld 408576698