diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-20 14:46:05 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-20 14:46:05 +0000 |
commit | 3a37ad4168654b9281fa38e1988357c6e7243854 (patch) | |
tree | 0caa1664988871e6b015184533a53d6ab95964d4 /ui/views | |
parent | c29ecd7050c71bd34d55e98786f5220ac1d1958e (diff) | |
download | chromium_src-3a37ad4168654b9281fa38e1988357c6e7243854.zip chromium_src-3a37ad4168654b9281fa38e1988357c6e7243854.tar.gz chromium_src-3a37ad4168654b9281fa38e1988357c6e7243854.tar.bz2 |
ui/base/models: Convert GetKeyCode() to unit_hacker() style (key_code()).
Note: This was a TODO for beng.
BUG=None
TEST=None
R=ben@chromium.org
Review URL: http://codereview.chromium.org/7050025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86079 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/views')
-rw-r--r-- | ui/views/events/accelerator.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/ui/views/events/accelerator.cc b/ui/views/events/accelerator.cc index 582c3a3..1e8592f 100644 --- a/ui/views/events/accelerator.cc +++ b/ui/views/events/accelerator.cc @@ -22,22 +22,22 @@ namespace ui { namespace { bool IsShiftDown(const Accelerator& accelerator) { - return (accelerator.GetKeyCode() & VKEY_SHIFT) == VKEY_SHIFT; + return (accelerator.key_code() & VKEY_SHIFT) == VKEY_SHIFT; } bool IsCtrlDown(const Accelerator& accelerator) { - return (accelerator.GetKeyCode() & VKEY_CONTROL) == VKEY_CONTROL; + return (accelerator.key_code() & VKEY_CONTROL) == VKEY_CONTROL; } bool IsAltDown(const Accelerator& accelerator) { - return (accelerator.GetKeyCode() & VKEY_MENU) == VKEY_MENU; + return (accelerator.key_code() & VKEY_MENU) == VKEY_MENU; } } // namespace string16 GetShortcutTextForAccelerator(const Accelerator& accelerator) { int string_id = 0; - switch(accelerator.GetKeyCode()) { + switch(accelerator.key_code()) { case ui::VKEY_TAB: string_id = IDS_APP_TAB_KEY; break; @@ -94,19 +94,19 @@ string16 GetShortcutTextForAccelerator(const Accelerator& accelerator) { // accent' for '0'). For display in the menu (e.g. Ctrl-0 for the // default zoom level), we leave VK_[0-9] alone without translation. wchar_t key; - if (accelerator.GetKeyCode() >= '0' && accelerator.GetKeyCode() <= '9') - key = accelerator.GetKeyCode(); + if (accelerator.key_code() >= '0' && accelerator.key_code() <= '9') + key = accelerator.key_code(); else - key = LOWORD(::MapVirtualKeyW(accelerator.GetKeyCode(), MAPVK_VK_TO_CHAR)); + key = LOWORD(::MapVirtualKeyW(accelerator.key_code(), MAPVK_VK_TO_CHAR)); shortcut += key; #elif defined(OS_LINUX) const gchar* name = NULL; - switch (accelerator.GetKeyCode()) { + switch (accelerator.key_code()) { case ui::VKEY_OEM_2: name = static_cast<const gchar*>("/"); break; default: - name = gdk_keyval_name(gdk_keyval_to_lower(accelerator.GetKeyCode())); + name = gdk_keyval_name(gdk_keyval_to_lower(accelerator.key_code())); break; } if (name) { |