summaryrefslogtreecommitdiffstats
path: root/views/event_win.cc
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-29 00:33:35 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-29 00:33:35 +0000
commitbc1407f95bae3d7472ee0c85ef83ee10610b3f1f (patch)
treeeeb1e01423fefc13afe5738d809df200b5e50623 /views/event_win.cc
parent62525634a6f5727216828f8e05a4f563be90dfeb (diff)
downloadchromium_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/event_win.cc')
-rw-r--r--views/event_win.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/views/event_win.cc b/views/event_win.cc
index 28d1330..da6457e 100644
--- a/views/event_win.cc
+++ b/views/event_win.cc
@@ -37,12 +37,13 @@ int Event::ConvertWindowsFlags(UINT win_flags) {
return r;
}
-KeyEvent::KeyEvent(EventType type, int ch, int repeat_count, int message_flags)
+KeyEvent::KeyEvent(EventType type, base::KeyboardCode key_code,
+ int repeat_count, int message_flags)
: Event(type, GetKeyStateFlags()),
- character_(ch),
+ key_code_(key_code),
repeat_count_(repeat_count),
message_flags_(message_flags) {
- }
+}
int KeyEvent::GetKeyStateFlags() const {
// Windows Keyboard messages don't come with control key state as parameters