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_WM_WINDOW_CYCLE_CONTROLLER_H_ | 5 #ifndef ASH_WM_WINDOW_CYCLE_CONTROLLER_H_ |
6 #define ASH_WM_WINDOW_CYCLE_CONTROLLER_H_ | 6 #define ASH_WM_WINDOW_CYCLE_CONTROLLER_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 void StopCycling(); | 93 void StopCycling(); |
94 | 94 |
95 // Checks if the window represents a container whose children we track. | 95 // Checks if the window represents a container whose children we track. |
96 static bool IsTrackedContainer(aura::Window* window); | 96 static bool IsTrackedContainer(aura::Window* window); |
97 | 97 |
98 // Overridden from ActivationChangeObserver: | 98 // Overridden from ActivationChangeObserver: |
99 virtual void OnWindowActivated(aura::Window* active, | 99 virtual void OnWindowActivated(aura::Window* active, |
100 aura::Window* old_active) OVERRIDE; | 100 aura::Window* old_active) OVERRIDE; |
101 | 101 |
102 // Overridden from WindowObserver: | 102 // Overridden from WindowObserver: |
| 103 virtual void OnWindowAdded(aura::Window* window) OVERRIDE; |
103 virtual void OnWillRemoveWindow(aura::Window* window) OVERRIDE; | 104 virtual void OnWillRemoveWindow(aura::Window* window) OVERRIDE; |
104 virtual void OnWindowDestroying(aura::Window* window) OVERRIDE; | 105 virtual void OnWindowDestroying(aura::Window* window) OVERRIDE; |
105 | 106 |
106 scoped_ptr<WindowCycleList> windows_; | 107 scoped_ptr<WindowCycleList> windows_; |
107 | 108 |
108 // Event filter to watch for release of alt key. | 109 // Event filter to watch for release of alt key. |
109 scoped_ptr<aura::EventFilter> event_filter_; | 110 scoped_ptr<aura::EventFilter> event_filter_; |
110 | 111 |
111 // List of windows that have been activated in containers that we cycle | 112 // List of windows that have been activated in containers that we cycle |
112 // through, sorted by most recently used. | 113 // through, sorted by most recently used. |
113 std::list<aura::Window*> mru_windows_; | 114 std::list<aura::Window*> mru_windows_; |
114 | 115 |
115 internal::ActivationController* activation_controller_; | 116 internal::ActivationController* activation_controller_; |
116 | 117 |
117 DISALLOW_COPY_AND_ASSIGN(WindowCycleController); | 118 DISALLOW_COPY_AND_ASSIGN(WindowCycleController); |
118 }; | 119 }; |
119 | 120 |
120 } // namespace ash | 121 } // namespace ash |
121 | 122 |
122 #endif // ASH_WM_WINDOW_CYCLE_CONTROLLER_H_ | 123 #endif // ASH_WM_WINDOW_CYCLE_CONTROLLER_H_ |
OLD | NEW |