Teach create_nmf.py about new toolchains' BFD format names
[chromium-blink-merge.git] / ash / focus_cycler.h
blobd0071d1078889dfce1c01ec3dc5b0cff382966b6
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_
8 #include <vector>
10 #include "ash/ash_export.h"
11 #include "base/basictypes.h"
12 #include "base/compiler_specific.h"
14 namespace views {
15 class Widget;
16 } // namespace views
18 namespace ash {
20 namespace internal {
22 // This class handles moving focus between a set of widgets and the main browser
23 // window.
24 class ASH_EXPORT FocusCycler {
25 public:
26 enum Direction {
27 FORWARD,
28 BACKWARD
31 FocusCycler();
32 ~FocusCycler();
34 // Returns the widget the FocusCycler is attempting to activate or NULL if
35 // FocusCycler is not activating any widgets.
36 const views::Widget* widget_activating() const { return widget_activating_; }
38 // Add a widget to the focus cycle. The widget needs to have an
39 // AccessiblePaneView as the content view.
40 void AddWidget(views::Widget* widget);
42 // Move focus to the next widget.
43 void RotateFocus(Direction direction);
45 // Moves focus the specified widget. Returns true if the widget was activated.
46 bool FocusWidget(views::Widget* widget);
48 private:
49 std::vector<views::Widget*> widgets_;
51 // See description above getter.
52 views::Widget* widget_activating_;
54 DISALLOW_COPY_AND_ASSIGN(FocusCycler);
57 } // namespace internal
59 } // namespace ash
61 #endif // FOCUS_CYCLER_H_