diff options
author | mazda@chromium.org <mazda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-14 13:33:23 +0000 |
---|---|---|
committer | mazda@chromium.org <mazda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-14 13:33:23 +0000 |
commit | c5be11f4e5663736128f7c0b34af155155a27806 (patch) | |
tree | e46c093059f09005cec058df6202dc4b4035a7f0 /views/focus/focus_manager.h | |
parent | 8bff0e34eb5f15a4f1210239a3aced0df9d5d317 (diff) | |
download | chromium_src-c5be11f4e5663736128f7c0b34af155155a27806.zip chromium_src-c5be11f4e5663736128f7c0b34af155155a27806.tar.gz chromium_src-c5be11f4e5663736128f7c0b34af155155a27806.tar.bz2 |
Move views::Accelerator to ui in order to use it from aura code.
This is the first preliminary change for the support of global keyboard shortcut.
BUG=97255
TEST=None
Review URL: http://codereview.chromium.org/8508055
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109872 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/focus/focus_manager.h')
-rw-r--r-- | views/focus/focus_manager.h | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/views/focus/focus_manager.h b/views/focus/focus_manager.h index 0fa5139..8ac84c5d 100644 --- a/views/focus/focus_manager.h +++ b/views/focus/focus_manager.h @@ -11,8 +11,10 @@ #include "base/basictypes.h" #include "base/observer_list.h" +#include "ui/base/models/accelerator.h" #include "ui/gfx/native_widget_types.h" -#include "views/accelerator.h" +#include "views/views_export.h" +#include "views/events/event.h" // The FocusManager class is used to handle focus traversal, store/restore // focused views and handle keyboard accelerators. @@ -187,15 +189,15 @@ class VIEWS_EXPORT FocusManager { // - the enter key // - any F key (F1, F2, F3 ...) // - any browser specific keys (as available on special keyboards) - void RegisterAccelerator(const Accelerator& accelerator, - AcceleratorTarget* target); + void RegisterAccelerator(const ui::Accelerator& accelerator, + ui::AcceleratorTarget* target); // Unregister the specified keyboard accelerator for the specified target. - void UnregisterAccelerator(const Accelerator& accelerator, - AcceleratorTarget* target); + void UnregisterAccelerator(const ui::Accelerator& accelerator, + ui::AcceleratorTarget* target); // Unregister all keyboard accelerator for the specified target. - void UnregisterAccelerators(AcceleratorTarget* target); + void UnregisterAccelerators(ui::AcceleratorTarget* target); // Activate the target associated with the specified accelerator. // First, AcceleratorPressed handler of the most recently registered target @@ -203,7 +205,7 @@ class VIEWS_EXPORT FocusManager { // this method immediately returns. If not, we do the same thing on the next // target, and so on. // Returns true if an accelerator was activated. - bool ProcessAccelerator(const Accelerator& accelerator); + bool ProcessAccelerator(const ui::Accelerator& accelerator); // Called by a RootView when a view within its hierarchy is removed // from its parent. This will only be called by a RootView in a @@ -219,8 +221,8 @@ class VIEWS_EXPORT FocusManager { // Returns the AcceleratorTarget that should be activated for the specified // keyboard accelerator, or NULL if no view is registered for that keyboard // accelerator. - AcceleratorTarget* GetCurrentTargetForAccelerator( - const Accelerator& accelertor) const; + ui::AcceleratorTarget* GetCurrentTargetForAccelerator( + const ui::Accelerator& accelertor) const; // Sets the focus to the specified native view. virtual void FocusNativeView(gfx::NativeView native_view); @@ -259,8 +261,8 @@ class VIEWS_EXPORT FocusManager { FocusChangeReason focus_change_reason_; // The accelerators and associated targets. - typedef std::list<AcceleratorTarget*> AcceleratorTargetList; - typedef std::map<Accelerator, AcceleratorTargetList> AcceleratorMap; + typedef std::list<ui::AcceleratorTarget*> AcceleratorTargetList; + typedef std::map<ui::Accelerator, AcceleratorTargetList> AcceleratorMap; AcceleratorMap accelerators_; // The list of registered FocusChange listeners. |