diff options
author | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-28 21:18:58 +0000 |
---|---|---|
committer | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-28 21:18:58 +0000 |
commit | d766882c913b272cc2db478d7640a317d838ebad (patch) | |
tree | 99424c7a994d0d771bd4c3bdf2b196042b937b62 /views/accelerator.h | |
parent | eb75208190b35bedd144e102ea5cc826358bbbfd (diff) | |
download | chromium_src-d766882c913b272cc2db478d7640a317d838ebad.zip chromium_src-d766882c913b272cc2db478d7640a317d838ebad.tar.gz chromium_src-d766882c913b272cc2db478d7640a317d838ebad.tar.bz2 |
Changing the KeyboardEvent to use a KeyboardCode instead of a w_char. Led to several places where I had to switch from VK_ to VKEY_.
Also cleaned-up the table view OnKeyDown method. Since TableView is a NativeControl it can use the NativeControl::OnKeyDown directly.
BUG=None
TEST=Make sure short-cuts works as expected, especially in the omnibox.
Review URL: http://codereview.chromium.org/248010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27412 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/accelerator.h')
-rw-r--r-- | views/accelerator.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/views/accelerator.h b/views/accelerator.h index bb8f91f..1848c98 100644 --- a/views/accelerator.h +++ b/views/accelerator.h @@ -13,13 +13,14 @@ #include <string> +#include "base/keyboard_codes.h" #include "views/event.h" namespace views { class Accelerator { public: - Accelerator(int keycode, + Accelerator(base::KeyboardCode keycode, bool shift_pressed, bool ctrl_pressed, bool alt_pressed) : key_code_(keycode) { modifiers_ = 0; @@ -74,7 +75,7 @@ class Accelerator { return (modifiers_ & Event::EF_ALT_DOWN) == Event::EF_ALT_DOWN; } - int GetKeyCode() const { + base::KeyboardCode GetKeyCode() const { return key_code_; } @@ -83,7 +84,7 @@ class Accelerator { private: // The window keycode (VK_...). - int key_code_; + base::KeyboardCode key_code_; // The state of the Shift/Ctrl/Alt keys (see event.h). int modifiers_; |