Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(605)

Unified Diff: views/focus/accelerator_handler.h

Issue 6487002: Add a new constructor to KeyEvent. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: views/focus/accelerator_handler.h
===================================================================
--- views/focus/accelerator_handler.h (revision 74437)
+++ views/focus/accelerator_handler.h (working copy)
@@ -35,7 +35,14 @@
// for the window that is receiving these messages for accelerator processing.
class AcceleratorHandler : public MessageLoopForUI::Dispatcher {
public:
- AcceleratorHandler();
+ AcceleratorHandler();
+
+#if defined(OS_WIN)
+ // Returns the message currently being processed.
+ // Note that this may not work for message loops run by the OS.
+ static const MSG& current_message() { return current_messages_.back(); }
+#endif
+
// Dispatcher method. This returns true if an accelerator was processed by the
// focus manager
#if defined(OS_WIN)
@@ -51,6 +58,9 @@
#if defined(OS_WIN)
// The keys currently pressed and consumed by the FocusManager.
std::set<WPARAM> pressed_keys_;
+
+ // A stack of current messages, to handle message loop nesting.
+ static std::vector<MSG> current_messages_;
sky 2011/02/10 20:59:35 statics can only be plain old data (POD).
#endif
DISALLOW_COPY_AND_ASSIGN(AcceleratorHandler);

Powered by Google App Engine
This is Rietveld 408576698