Chromium Code Reviews| 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); |