| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef ASH_COMMON_FOCUS_CYCLER_H_ | 5 #ifndef ASH_COMMON_FOCUS_CYCLER_H_ |
| 6 #define ASH_COMMON_FOCUS_CYCLER_H_ | 6 #define ASH_COMMON_FOCUS_CYCLER_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 | 12 |
| 13 namespace views { | 13 namespace views { |
| 14 class Widget; | 14 class Widget; |
| 15 } // namespace views | 15 } // namespace views |
| 16 | 16 |
| 17 namespace ash { | 17 namespace ash { |
| 18 | 18 |
| 19 // This class handles moving focus between a set of widgets and the main browser | 19 // This class handles moving focus between a set of widgets and the main browser |
| 20 // window. | 20 // window. |
| 21 class ASH_EXPORT FocusCycler { | 21 class ASH_EXPORT FocusCycler { |
| 22 public: | 22 public: |
| 23 enum Direction { | 23 enum Direction { FORWARD, BACKWARD }; |
| 24 FORWARD, | |
| 25 BACKWARD | |
| 26 }; | |
| 27 | 24 |
| 28 FocusCycler(); | 25 FocusCycler(); |
| 29 ~FocusCycler(); | 26 ~FocusCycler(); |
| 30 | 27 |
| 31 // Returns the widget the FocusCycler is attempting to activate or NULL if | 28 // Returns the widget the FocusCycler is attempting to activate or NULL if |
| 32 // FocusCycler is not activating any widgets. | 29 // FocusCycler is not activating any widgets. |
| 33 const views::Widget* widget_activating() const { return widget_activating_; } | 30 const views::Widget* widget_activating() const { return widget_activating_; } |
| 34 | 31 |
| 35 // Add a widget to the focus cycle. The widget needs to have an | 32 // Add a widget to the focus cycle. The widget needs to have an |
| 36 // AccessiblePaneView as the content view. | 33 // AccessiblePaneView as the content view. |
| (...skipping 13 matching lines...) Expand all Loading... |
| 50 | 47 |
| 51 // See description above getter. | 48 // See description above getter. |
| 52 views::Widget* widget_activating_; | 49 views::Widget* widget_activating_; |
| 53 | 50 |
| 54 DISALLOW_COPY_AND_ASSIGN(FocusCycler); | 51 DISALLOW_COPY_AND_ASSIGN(FocusCycler); |
| 55 }; | 52 }; |
| 56 | 53 |
| 57 } // namespace ash | 54 } // namespace ash |
| 58 | 55 |
| 59 #endif // ASH_COMMON_FOCUS_CYCLER_H_ | 56 #endif // ASH_COMMON_FOCUS_CYCLER_H_ |
| OLD | NEW |