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> |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 // 0, 3, 6, 1, 4, 2, 5 | 44 // 0, 3, 6, 1, 4, 2, 5 |
45 // The selector is switched to the next window grid (if available) or wrapped if | 45 // The selector is switched to the next window grid (if available) or wrapped if |
46 // it reaches the end of its movement sequence. | 46 // it reaches the end of its movement sequence. |
47 class ASH_EXPORT WindowGrid : public WmWindowObserver { | 47 class ASH_EXPORT WindowGrid : public WmWindowObserver { |
48 public: | 48 public: |
49 WindowGrid(WmWindow* root_window, | 49 WindowGrid(WmWindow* root_window, |
50 const std::vector<WmWindow*>& window_list, | 50 const std::vector<WmWindow*>& window_list, |
51 WindowSelector* window_selector); | 51 WindowSelector* window_selector); |
52 ~WindowGrid() override; | 52 ~WindowGrid() override; |
53 | 53 |
| 54 // Exits overview mode, fading out the |shield_widget_| if necessary. |
| 55 void Shutdown(); |
| 56 |
54 // Prepares the windows in this grid for overview. This will restore all | 57 // Prepares the windows in this grid for overview. This will restore all |
55 // minimized windows and ensure they are visible. | 58 // minimized windows and ensure they are visible. |
56 void PrepareForOverview(); | 59 void PrepareForOverview(); |
57 | 60 |
58 // Positions all the windows in rows of equal height scaling each window to | 61 // Positions all the windows in rows of equal height scaling each window to |
59 // fit that height. | 62 // fit that height. |
60 // Layout is done in 2 stages maintaining fixed MRU ordering. | 63 // Layout is done in 2 stages maintaining fixed MRU ordering. |
61 // 1. Optimal height is determined. In this stage |height| is bisected to find | 64 // 1. Optimal height is determined. In this stage |height| is bisected to find |
62 // maximum height which still allows all the windows to fit. | 65 // maximum height which still allows all the windows to fit. |
63 // 2. Row widths are balanced. In this stage the available width is reduced | 66 // 2. Row widths are balanced. In this stage the available width is reduced |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 | 182 |
180 // Number of columns in the grid. | 183 // Number of columns in the grid. |
181 size_t num_columns_; | 184 size_t num_columns_; |
182 | 185 |
183 DISALLOW_COPY_AND_ASSIGN(WindowGrid); | 186 DISALLOW_COPY_AND_ASSIGN(WindowGrid); |
184 }; | 187 }; |
185 | 188 |
186 } // namespace ash | 189 } // namespace ash |
187 | 190 |
188 #endif // ASH_COMMON_WM_OVERVIEW_WINDOW_GRID_H_ | 191 #endif // ASH_COMMON_WM_OVERVIEW_WINDOW_GRID_H_ |
OLD | NEW |