diff options
author | skuhne@chromium.org <skuhne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-20 22:05:38 +0000 |
---|---|---|
committer | skuhne@chromium.org <skuhne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-20 22:05:38 +0000 |
commit | 12abb20ae922d192978205a9259d663cd0aeeb3d (patch) | |
tree | e37dfffe1134658a8a8d832d5faed5c95f24766e /ash/accelerators/accelerator_controller.h | |
parent | 4a2697a63edf3887cd7663e45db4a97fc6553bc8 (diff) | |
download | chromium_src-12abb20ae922d192978205a9259d663cd0aeeb3d.zip chromium_src-12abb20ae922d192978205a9259d663cd0aeeb3d.tar.gz chromium_src-12abb20ae922d192978205a9259d663cd0aeeb3d.tar.bz2 |
Adding Alt+<number> accelerator key
BUG=117481
TEST=None
Review URL: http://codereview.chromium.org/9677046
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127805 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/accelerators/accelerator_controller.h')
-rw-r--r-- | ash/accelerators/accelerator_controller.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/ash/accelerators/accelerator_controller.h b/ash/accelerators/accelerator_controller.h index d04e5d7..e1a5f18 100644 --- a/ash/accelerators/accelerator_controller.h +++ b/ash/accelerators/accelerator_controller.h @@ -34,20 +34,20 @@ class ASH_EXPORT AcceleratorController : public ui::AcceleratorTarget { AcceleratorController(); virtual ~AcceleratorController(); - // Register a global keyboard accelerator for the specified target. If + // Registers a global keyboard accelerator for the specified target. If // multiple targets are registered for an accelerator, a target registered // later has higher priority. void Register(const ui::Accelerator& accelerator, ui::AcceleratorTarget* target); - // Unregister the specified keyboard accelerator for the specified target. + // Unregisters the specified keyboard accelerator for the specified target. void Unregister(const ui::Accelerator& accelerator, ui::AcceleratorTarget* target); - // Unregister all keyboard accelerators for the specified target. + // Unregisters all keyboard accelerators for the specified target. void UnregisterAll(ui::AcceleratorTarget* target); - // Activate the target associated with the specified accelerator. + // 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), // this method immediately returns. If not, we do the same thing on the next @@ -74,9 +74,13 @@ class ASH_EXPORT AcceleratorController : public ui::AcceleratorTarget { } private: - // Initialize the accelerators this class handles as a target. + // Initializes the accelerators this class handles as a target. void Init(); + // Switches to a 0-indexed (in order of creation) window. + // A negative index switches to the last window in the list. + void SwitchToWindow(int window); + scoped_ptr<ui::AcceleratorManager> accelerator_manager_; scoped_ptr<BrightnessControlDelegate> brightness_control_delegate_; |