diff options
author | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-29 00:33:35 +0000 |
---|---|---|
committer | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-29 00:33:35 +0000 |
commit | bc1407f95bae3d7472ee0c85ef83ee10610b3f1f (patch) | |
tree | eeb1e01423fefc13afe5738d809df200b5e50623 /views/controls/menu/menu_win.cc | |
parent | 62525634a6f5727216828f8e05a4f563be90dfeb (diff) | |
download | chromium_src-bc1407f95bae3d7472ee0c85ef83ee10610b3f1f.zip chromium_src-bc1407f95bae3d7472ee0c85ef83ee10610b3f1f.tar.gz chromium_src-bc1407f95bae3d7472ee0c85ef83ee10610b3f1f.tar.bz2 |
Relanding keyboard code refactoring:
http://codereview.chromium.org/248010/show
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/251020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27444 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls/menu/menu_win.cc')
-rw-r--r-- | views/controls/menu/menu_win.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/views/controls/menu/menu_win.cc b/views/controls/menu/menu_win.cc index 68cc8ff..852304f 100644 --- a/views/controls/menu/menu_win.cc +++ b/views/controls/menu/menu_win.cc @@ -11,6 +11,7 @@ #include "app/l10n_util.h" #include "app/l10n_util_win.h" #include "base/gfx/rect.h" +#include "base/keyboard_codes.h" #include "base/logging.h" #include "base/stl_util-inl.h" #include "base/string_util.h" @@ -441,7 +442,7 @@ void MenuWin::AddMenuItemInternal(int index, delegate()->GetLabel(item_id) : label); // Find out if there is a shortcut we need to append to the label. - views::Accelerator accelerator(0, false, false, false); + views::Accelerator accelerator(base::VKEY_UNKNOWN, false, false, false); if (delegate() && delegate()->GetAcceleratorInfo(item_id, &accelerator)) { actual_label += L'\t'; actual_label += accelerator.GetShortcutText(); |