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_COMMON_WM_OVERVIEW_WINDOW_GRID_H_ | 5 #ifndef ASH_COMMON_WM_OVERVIEW_WINDOW_GRID_H_ |
6 #define ASH_COMMON_WM_OVERVIEW_WINDOW_GRID_H_ | 6 #define ASH_COMMON_WM_OVERVIEW_WINDOW_GRID_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 #include <set> | 11 #include <set> |
12 #include <vector> | 12 #include <vector> |
13 | 13 |
14 #include "ash/common/wm/overview/window_selector.h" | 14 #include "ash/common/wm/overview/window_selector.h" |
15 #include "ash/common/wm_window_observer.h" | 15 #include "ash/common/wm_window_observer.h" |
16 #include "base/macros.h" | 16 #include "base/macros.h" |
17 #include "base/memory/scoped_vector.h" | 17 #include "base/memory/scoped_vector.h" |
18 | 18 |
19 namespace views { | 19 namespace views { |
20 class Widget; | 20 class Widget; |
21 } | 21 } |
22 | 22 |
| 23 namespace wm { |
| 24 class Shadow; |
| 25 } |
| 26 |
23 namespace ash { | 27 namespace ash { |
24 | 28 |
25 class WindowSelectorItem; | 29 class WindowSelectorItem; |
26 | 30 |
27 // Represents a grid of windows in the Overview Mode in a particular root | 31 // Represents a grid of windows in the Overview Mode in a particular root |
28 // window, and manages a selection widget that can be moved with the arrow keys. | 32 // window, and manages a selection widget that can be moved with the arrow keys. |
29 // The idea behind the movement strategy is that it should be possible to access | 33 // The idea behind the movement strategy is that it should be possible to access |
30 // any window pressing a given arrow key repeatedly. | 34 // any window pressing a given arrow key repeatedly. |
31 // +-------+ +-------+ +-------+ | 35 // +-------+ +-------+ +-------+ |
32 // | 0 | | 1 | | 2 | | 36 // | 0 | | 1 | | 2 | |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 | 171 |
168 // Vector containing the observed windows. | 172 // Vector containing the observed windows. |
169 std::set<WmWindow*> observed_windows_; | 173 std::set<WmWindow*> observed_windows_; |
170 | 174 |
171 // Widget that darkens the screen background. | 175 // Widget that darkens the screen background. |
172 std::unique_ptr<views::Widget> shield_widget_; | 176 std::unique_ptr<views::Widget> shield_widget_; |
173 | 177 |
174 // Widget that indicates to the user which is the selected window. | 178 // Widget that indicates to the user which is the selected window. |
175 std::unique_ptr<views::Widget> selection_widget_; | 179 std::unique_ptr<views::Widget> selection_widget_; |
176 | 180 |
| 181 // Shadow around the selector. |
| 182 std::unique_ptr<::wm::Shadow> selector_shadow_; |
| 183 |
177 // Current selected window position. | 184 // Current selected window position. |
178 size_t selected_index_; | 185 size_t selected_index_; |
179 | 186 |
180 // Number of columns in the grid. | 187 // Number of columns in the grid. |
181 size_t num_columns_; | 188 size_t num_columns_; |
182 | 189 |
183 DISALLOW_COPY_AND_ASSIGN(WindowGrid); | 190 DISALLOW_COPY_AND_ASSIGN(WindowGrid); |
184 }; | 191 }; |
185 | 192 |
186 } // namespace ash | 193 } // namespace ash |
187 | 194 |
188 #endif // ASH_COMMON_WM_OVERVIEW_WINDOW_GRID_H_ | 195 #endif // ASH_COMMON_WM_OVERVIEW_WINDOW_GRID_H_ |
OLD | NEW |