summaryrefslogtreecommitdiffstats
path: root/views/event.h
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-25 23:15:41 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-25 23:15:41 +0000
commitc566c610480e0d8e915193c058f415a7660d48b5 (patch)
treef36460711defe77bb82f060ab1aa005a24de5475 /views/event.h
parente098ce874e942a11083116f848310d026e8c37c8 (diff)
downloadchromium_src-c566c610480e0d8e915193c058f415a7660d48b5.zip
chromium_src-c566c610480e0d8e915193c058f415a7660d48b5.tar.gz
chromium_src-c566c610480e0d8e915193c058f415a7660d48b5.tar.bz2
[Relanding erg's change with fix for toolkit_views shortcuts and
interactive ui tests. Note that this was originally reviewed in http://codereview.chromium.org/217022/show I originally Elliot suggestion of replacing the usage of int for keycode with the bae::Keycode type, but that led to the CL getting out of hands (as this is used in many different places). So this is only the patch set 1 of that CL, I'll replace the type in another CL] Use windows keycodes under linux (and all non-windows platforms). This fixes any place where we use a VKEY_* (RenderWidgetHost, for example) under Linux, but breaks accelerators in TOOLKIT_VIEWS which relied on this wrong behaviour. Previously, keyboard_codes_linux defined all the VKEY_* constants as their GDK_* counterparts, which is wrong since the VKEY_* are supposed to resolve to windows key codes. BUG=22551 TEST=Make sure accelerators still work as expected on Chrome Linux and Chrome Linux with toolkit views. Test when the the accelerators with the focus in the location bar and also with the focus on the page. Review URL: http://codereview.chromium.org/235025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27284 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/event.h')
-rw-r--r--views/event.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/views/event.h b/views/event.h
index 882f558..5a6efd9 100644
--- a/views/event.h
+++ b/views/event.h
@@ -244,9 +244,13 @@ class KeyEvent : public Event {
// Create a new key event
KeyEvent(EventType type, int ch, int repeat_count, int message_flags);
#elif defined(OS_LINUX)
- KeyEvent(GdkEventKey* event, bool make_lower_case);
+ explicit KeyEvent(GdkEventKey* event);
#endif
+ // This returns a VKEY_ value as defined in base/keyboard_codes.h which is
+ // the Windows value.
+ // On GTK, you can use the methods in keyboard_code_conversion_gtk.cc to
+ // convert this value back to a GDK value if needed.
int GetCharacter() const {
return character_;
}