| 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_VIEWS_FOCUS_FOCUS_MANAGER_DELEGATE_H_ |
| 6 #define UI_VIEWS_FOCUS_FOCUS_MANAGER_DELEGATE_H_ |
| 7 #pragma once |
| 8 |
| 9 namespace ui { |
| 10 class AcceleratorTarget; |
| 11 class AcceleratorManager; |
| 12 } |
| 13 |
| 14 namespace views { |
| 15 |
| 16 // Delegate interface for views::FocusManager. |
| 17 class VIEWS_EXPORT FocusManagerDelegate { |
| 18 public: |
| 19 virtual ~FocusManagerDelegate() {} |
| 20 |
| 21 // Activate the target associated with the specified accelerator. |
| 22 // First, AcceleratorPressed handler of the most recently registered target |
| 23 // is called, and if that handler processes the event (i.e. returns true), |
| 24 // this method immediately returns. If not, we do the same thing on the next |
| 25 // target, and so on. |
| 26 // Returns true if an accelerator was activated. |
| 27 virtual bool ProcessAccelerator(const ui::Accelerator& accelerator) = 0; |
| 28 |
| 29 // Returns the AcceleratorTarget that should be activated for the specified |
| 30 // keyboard accelerator, or NULL if no view is registered for that keyboard |
| 31 // accelerator. |
| 32 virtual ui::AcceleratorTarget* GetCurrentTargetForAccelerator( |
| 33 const ui::Accelerator& accelerator) const = 0; |
| 34 }; |
| 35 |
| 36 } // namespace views |
| 37 |
| 38 #endif // UI_VIEWS_FOCUS_FOCUS_MANAGER_DELEGATE_H_ |
| OLD | NEW |