summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/accelerator_table_gtk.h
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-04 22:02:38 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-04 22:02:38 +0000
commit3e1d64f89519254b96939bd035475c9128bc9162 (patch)
treeadaf24b8a046ab19b26bc7f84558224764063048 /chrome/browser/views/accelerator_table_gtk.h
parent789e915d30f635f26016b30482d13bca2db6b12c (diff)
downloadchromium_src-3e1d64f89519254b96939bd035475c9128bc9162.zip
chromium_src-3e1d64f89519254b96939bd035475c9128bc9162.tar.gz
chromium_src-3e1d64f89519254b96939bd035475c9128bc9162.tar.bz2
The initial registration of the browser accelerators for toolkit_views was sharing the accelerator table withe the GTK implementation.
It was missing some accelerators that are not defined in the table but in standard_menus.cc. Turns out it's probably easier for toolkit_views and Gtk not to share that accelerator map. I reverted the Gtk browser view to use a non shared accelerator table, and moved the accelerator table file to be toolkit_views specific. BUG=None TEST=Run Chrome (toolkit_views). Make sure accelerators (such as Ctrl-T, Ctrl-N...) work Review URL: http://codereview.chromium.org/160544 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22423 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/accelerator_table_gtk.h')
-rw-r--r--chrome/browser/views/accelerator_table_gtk.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/chrome/browser/views/accelerator_table_gtk.h b/chrome/browser/views/accelerator_table_gtk.h
new file mode 100644
index 0000000..830fdb2
--- /dev/null
+++ b/chrome/browser/views/accelerator_table_gtk.h
@@ -0,0 +1,27 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_VIEWS_ACCELERATOR_TABLE_GTK_H_
+#define CHROME_BROWSER_VIEWS_ACCELERATOR_TABLE_GTK_H_
+
+#include <gtk/gtk.h>
+
+// This contains the list of accelerators shared between the Linux Gtk and
+// toolkit_view implementation.
+namespace browser {
+
+ struct AcceleratorMapping {
+ guint keyval;
+ int command_id;
+ GdkModifierType modifier_type;
+ };
+
+ // The list of accelerators.
+ extern const AcceleratorMapping kAcceleratorMap[];
+
+ // The numbers of elements in kAcceleratorMap.
+ extern const size_t kAcceleratorMapLength;
+}
+
+#endif // CHROME_BROWSER_VIEWS_ACCELERATOR_TABLE_GTK_H_