OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_WM_WINDOW_CYCLE_LIST_H_ | 5 #ifndef ASH_WM_WINDOW_CYCLE_LIST_H_ |
6 #define ASH_WM_WINDOW_CYCLE_LIST_H_ | 6 #define ASH_WM_WINDOW_CYCLE_LIST_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "ash/ash_export.h" | 11 #include "ash/ash_export.h" |
12 #include "ash/wm/window_cycle_controller.h" | 12 #include "ash/wm/window_cycle_controller.h" |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
14 #include "base/scoped_observer.h" | 14 #include "base/scoped_observer.h" |
15 #include "base/timer/timer.h" | 15 #include "base/timer/timer.h" |
16 #include "ui/aura/window_observer.h" | 16 #include "ui/aura/window_observer.h" |
17 #include "ui/display/display_observer.h" | 17 #include "ui/display/display_observer.h" |
18 | 18 |
| 19 namespace aura { |
| 20 class Window; |
| 21 } |
| 22 |
19 namespace display { | 23 namespace display { |
20 class Screen; | 24 class Screen; |
21 } | 25 } |
22 | 26 |
23 namespace views { | 27 namespace views { |
24 class Widget; | 28 class Widget; |
25 } | 29 } |
26 | 30 |
27 namespace ash { | 31 namespace ash { |
28 | 32 |
29 class WindowCycleView; | 33 class WindowCycleView; |
30 | 34 |
31 // Tracks a set of Windows that can be stepped through. This class is used by | 35 // Tracks a set of Windows that can be stepped through. This class is used by |
32 // the WindowCycleController. | 36 // the WindowCycleController. |
33 class ASH_EXPORT WindowCycleList : public aura::WindowObserver, | 37 class ASH_EXPORT WindowCycleList : public aura::WindowObserver, |
34 public display::DisplayObserver { | 38 public display::DisplayObserver { |
35 public: | 39 public: |
36 using WindowList = std::vector<WmWindow*>; | 40 using WindowList = std::vector<aura::Window*>; |
37 | 41 |
38 explicit WindowCycleList(const WindowList& windows); | 42 explicit WindowCycleList(const WindowList& windows); |
39 ~WindowCycleList() override; | 43 ~WindowCycleList() override; |
40 | 44 |
41 bool empty() const { return windows_.empty(); } | 45 bool empty() const { return windows_.empty(); } |
42 | 46 |
43 // Cycles to the next or previous window based on |direction|. | 47 // Cycles to the next or previous window based on |direction|. |
44 void Step(WindowCycleController::Direction direction); | 48 void Step(WindowCycleController::Direction direction); |
45 | 49 |
46 int current_index() const { return current_index_; } | 50 int current_index() const { return current_index_; } |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 | 105 |
102 // A timer to delay showing the UI. Quick Alt+Tab should not flash a UI. | 106 // A timer to delay showing the UI. Quick Alt+Tab should not flash a UI. |
103 base::OneShotTimer show_ui_timer_; | 107 base::OneShotTimer show_ui_timer_; |
104 | 108 |
105 DISALLOW_COPY_AND_ASSIGN(WindowCycleList); | 109 DISALLOW_COPY_AND_ASSIGN(WindowCycleList); |
106 }; | 110 }; |
107 | 111 |
108 } // namespace ash | 112 } // namespace ash |
109 | 113 |
110 #endif // ASH_WM_WINDOW_CYCLE_LIST_H_ | 114 #endif // ASH_WM_WINDOW_CYCLE_LIST_H_ |
OLD | NEW |