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 FOCUS_CYCLER_H_
6 #define FOCUS_CYCLER_H_
10 #include "ash/ash_export.h"
11 #include "base/basictypes.h"
12 #include "base/compiler_specific.h"
20 // This class handles moving focus between a set of widgets and the main browser
22 class ASH_EXPORT FocusCycler
{
32 // Returns the widget the FocusCycler is attempting to activate or NULL if
33 // FocusCycler is not activating any widgets.
34 const views::Widget
* widget_activating() const { return widget_activating_
; }
36 // Add a widget to the focus cycle. The widget needs to have an
37 // AccessiblePaneView as the content view.
38 void AddWidget(views::Widget
* widget
);
40 // Move focus to the next widget.
41 void RotateFocus(Direction direction
);
43 // Moves focus the specified widget. Returns true if the widget was activated.
44 bool FocusWidget(views::Widget
* widget
);
47 std::vector
<views::Widget
*> widgets_
;
49 // See description above getter.
50 views::Widget
* widget_activating_
;
52 DISALLOW_COPY_AND_ASSIGN(FocusCycler
);
57 #endif // FOCUS_CYCLER_H_