summaryrefslogtreecommitdiffstats
path: root/views/focus/accelerator_handler.h
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-06 06:18:24 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-06 06:18:24 +0000
commiteef7bcbd52895ceeb57652797d416fe4add18d03 (patch)
tree6afa18eae77240f6ddb721137bf16b4770226e04 /views/focus/accelerator_handler.h
parent84ac7f362e565c096851a783ca7163b78e19b659 (diff)
downloadchromium_src-eef7bcbd52895ceeb57652797d416fe4add18d03.zip
chromium_src-eef7bcbd52895ceeb57652797d416fe4add18d03.tar.gz
chromium_src-eef7bcbd52895ceeb57652797d416fe4add18d03.tar.bz2
This CL make the AcceleratorDispatcher eat the WM_KEYUP associated to
WM_KEYDOWN that resulted in an accelerator, as they would cause orphaned KeyUp events to be sent to views. This is Windows only for now, still needs to be ported to Linux. BUG=23383 TEST=Run unit-tests. Ensure accelerators work as expected in Chrome. Review URL: http://codereview.chromium.org/246074 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28096 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/focus/accelerator_handler.h')
-rw-r--r--views/focus/accelerator_handler.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/views/focus/accelerator_handler.h b/views/focus/accelerator_handler.h
index 618f541..c440c6b 100644
--- a/views/focus/accelerator_handler.h
+++ b/views/focus/accelerator_handler.h
@@ -5,10 +5,16 @@
#ifndef VIEWS_FOCUS_ACCELERATOR_HANDLER_H_
#define VIEWS_FOCUS_ACCELERATOR_HANDLER_H_
+#include "build/build_config.h"
+
#if defined(OS_LINUX)
#include <gdk/gdk.h>
#endif
+#if defined(OS_WIN)
+#include <set>
+#endif
+
#include "base/message_loop.h"
namespace views {
@@ -27,8 +33,10 @@ class AcceleratorHandler : public MessageLoopForUI::Dispatcher {
#endif
private:
-#if defined(OS_LINUX)
- // Last key pressed and consumed as an accelerator.
+#if defined(OS_WIN)
+ // The keys currently pressed and consumed by the FocusManager.
+ std::set<WPARAM> pressed_keys_;
+#else // OS_LINUX
guint last_key_pressed_;
#endif