| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2012 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 UI_WM_CORE_NESTED_ACCELERATOR_DELEGATE_H_ | |
| 6 #define UI_WM_CORE_NESTED_ACCELERATOR_DELEGATE_H_ | |
| 7 | |
| 8 namespace ui { | |
| 9 class KeyEvent; | |
| 10 } | |
| 11 | |
| 12 namespace wm { | |
| 13 | |
| 14 // A delegate interface that implements the behavior of nested accelerator | |
| 15 // handling. | |
| 16 class NestedAcceleratorDelegate { | |
| 17 public: | |
| 18 virtual ~NestedAcceleratorDelegate() {} | |
| 19 | |
| 20 // If the key event should be ignored now and instead be reposted so that next | |
| 21 // event loop. | |
| 22 virtual bool ShouldProcessEventNow(const ui::KeyEvent& key_event) = 0; | |
| 23 | |
| 24 // Attempts to process an accelerator for the key-event. | |
| 25 // Returns whether an accelerator was triggered and processed. | |
| 26 virtual bool ProcessEvent(const ui::KeyEvent& key_event) = 0; | |
| 27 }; | |
| 28 | |
| 29 } // namespace wm | |
| 30 | |
| 31 #endif // UI_WM_CORE_NESTED_ACCELERATOR_DELEGATE_H_ | |
| OLD | NEW |