| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef VIEWS_WIDGET_ACCELERATOR_HANDLER_H_ | |
| 6 #define VIEWS_WIDGET_ACCELERATOR_HANDLER_H_ | |
| 7 | |
| 8 #include "base/message_loop.h" | |
| 9 | |
| 10 namespace views { | |
| 11 | |
| 12 // This class delegates WM_KEYDOWN and WM_SYSKEYDOWN messages to | |
| 13 // the associated FocusManager class for the window that is receiving | |
| 14 // these messages for accelerator processing. The BrowserProcess object | |
| 15 // holds a singleton instance of this class which can be used by other | |
| 16 // custom message loop dispatcher objects to implement default accelerator | |
| 17 // handling. | |
| 18 class AcceleratorHandler : public MessageLoopForUI::Dispatcher { | |
| 19 public: | |
| 20 AcceleratorHandler(); | |
| 21 // Dispatcher method. This returns true if an accelerator was | |
| 22 // processed by the focus manager | |
| 23 virtual bool Dispatch(const MSG& msg); | |
| 24 private: | |
| 25 DISALLOW_EVIL_CONSTRUCTORS(AcceleratorHandler); | |
| 26 }; | |
| 27 | |
| 28 } // namespace views | |
| 29 | |
| 30 #endif // VIEWS_WIDGET_ACCELERATOR_HANDLER_H_ | |
| OLD | NEW |