diff options
author | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-25 23:15:41 +0000 |
---|---|---|
committer | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-25 23:15:41 +0000 |
commit | c566c610480e0d8e915193c058f415a7660d48b5 (patch) | |
tree | f36460711defe77bb82f060ab1aa005a24de5475 /chrome/browser/views/accelerator_table_gtk.h | |
parent | e098ce874e942a11083116f848310d026e8c37c8 (diff) | |
download | chromium_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 'chrome/browser/views/accelerator_table_gtk.h')
-rw-r--r-- | chrome/browser/views/accelerator_table_gtk.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/chrome/browser/views/accelerator_table_gtk.h b/chrome/browser/views/accelerator_table_gtk.h index 830fdb2..29f7588 100644 --- a/chrome/browser/views/accelerator_table_gtk.h +++ b/chrome/browser/views/accelerator_table_gtk.h @@ -5,16 +5,18 @@ #ifndef CHROME_BROWSER_VIEWS_ACCELERATOR_TABLE_GTK_H_ #define CHROME_BROWSER_VIEWS_ACCELERATOR_TABLE_GTK_H_ -#include <gtk/gtk.h> +#include <stdio.h> -// This contains the list of accelerators shared between the Linux Gtk and -// toolkit_view implementation. +// This contains the list of accelerators for the Linux toolkit_view +// implementation. namespace browser { struct AcceleratorMapping { - guint keyval; + int keycode; + bool shift_pressed; + bool ctrl_pressed; + bool alt_pressed; int command_id; - GdkModifierType modifier_type; }; // The list of accelerators. |