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.
5 #ifndef UI_VIEWS_FOCUS_FOCUS_MANAGER_DELEGATE_H_
6 #define UI_VIEWS_FOCUS_FOCUS_MANAGER_DELEGATE_H_
8 #include "ui/views/views_export.h"
12 class AcceleratorTarget
;
17 // Delegate interface for views::FocusManager.
18 class VIEWS_EXPORT FocusManagerDelegate
{
20 virtual ~FocusManagerDelegate() {}
22 // Activate the target associated with the specified accelerator.
23 // First, AcceleratorPressed handler of the most recently registered target
24 // is called, and if that handler processes the event (i.e. returns true),
25 // this method immediately returns. If not, we do the same thing on the next
27 // Returns true if an accelerator was activated.
28 virtual bool ProcessAccelerator(const ui::Accelerator
& accelerator
) = 0;
30 // Returns the AcceleratorTarget that should be activated for the specified
31 // keyboard accelerator, or NULL if no view is registered for that keyboard
33 virtual ui::AcceleratorTarget
* GetCurrentTargetForAccelerator(
34 const ui::Accelerator
& accelerator
) const = 0;
39 #endif // UI_VIEWS_FOCUS_FOCUS_MANAGER_DELEGATE_H_