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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 // widest rows respectively. In-values of the |max_bottom|, |min_right| and | 154 // widest rows respectively. In-values of the |max_bottom|, |min_right| and |
155 // |max_right| parameters are ignored and their values are always initialized | 155 // |max_right| parameters are ignored and their values are always initialized |
156 // inside this method. Returns true on success and false otherwise. | 156 // inside this method. Returns true on success and false otherwise. |
157 bool FitWindowRectsInBounds(const gfx::Rect& bounds, | 157 bool FitWindowRectsInBounds(const gfx::Rect& bounds, |
158 int height, | 158 int height, |
159 std::vector<gfx::Rect>* rects, | 159 std::vector<gfx::Rect>* rects, |
160 int* max_bottom, | 160 int* max_bottom, |
161 int* min_right, | 161 int* min_right, |
162 int* max_right); | 162 int* max_right); |
163 | 163 |
164 // Sets up WindowSelectorItem to use masks or shapes based on command flags. | 164 // Returns the target bounds of the currently selected item. |
165 // TODO(varkha): remove this in the next patch and use shapes but not masks. | 165 const gfx::Rect GetSelectionBounds() const; |
166 void PrepareForUsingMasksOrShapes(size_t windows_count) const; | |
167 | 166 |
168 // Root window the grid is in. | 167 // Root window the grid is in. |
169 WmWindow* root_window_; | 168 WmWindow* root_window_; |
170 | 169 |
171 // Pointer to the window selector that spawned this grid. | 170 // Pointer to the window selector that spawned this grid. |
172 WindowSelector* window_selector_; | 171 WindowSelector* window_selector_; |
173 | 172 |
174 // Vector containing all the windows in this grid. | 173 // Vector containing all the windows in this grid. |
175 ScopedVector<WindowSelectorItem> window_list_; | 174 ScopedVector<WindowSelectorItem> window_list_; |
176 | 175 |
(...skipping 16 matching lines...) Expand all Loading... |
193 | 192 |
194 // True only after all windows have been prepared for overview. | 193 // True only after all windows have been prepared for overview. |
195 bool prepared_for_overview_; | 194 bool prepared_for_overview_; |
196 | 195 |
197 DISALLOW_COPY_AND_ASSIGN(WindowGrid); | 196 DISALLOW_COPY_AND_ASSIGN(WindowGrid); |
198 }; | 197 }; |
199 | 198 |
200 } // namespace ash | 199 } // namespace ash |
201 | 200 |
202 #endif // ASH_COMMON_WM_OVERVIEW_WINDOW_GRID_H_ | 201 #endif // ASH_COMMON_WM_OVERVIEW_WINDOW_GRID_H_ |
OLD | NEW |