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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 // Returns true if a window is contained in any of the WindowSelectorItems | 84 // Returns true if a window is contained in any of the WindowSelectorItems |
85 // this grid owns. | 85 // this grid owns. |
86 bool Contains(const WmWindow* window) const; | 86 bool Contains(const WmWindow* window) const; |
87 | 87 |
88 // Dims the items whose titles do not contain |pattern| and prevents their | 88 // Dims the items whose titles do not contain |pattern| and prevents their |
89 // selection. The pattern has its accents removed and is converted to | 89 // selection. The pattern has its accents removed and is converted to |
90 // lowercase in a l10n sensitive context. | 90 // lowercase in a l10n sensitive context. |
91 // If |pattern| is empty, no item is dimmed. | 91 // If |pattern| is empty, no item is dimmed. |
92 void FilterItems(const base::string16& pattern); | 92 void FilterItems(const base::string16& pattern); |
93 | 93 |
| 94 // Called when |window| is about to get closed. If the |window| is currently |
| 95 // selected the implementation fades out |selection_widget_| to transparent |
| 96 // opacity, effectively hiding the selector widget. |
| 97 void WindowClosing(WindowSelectorItem* window); |
| 98 |
94 // Returns true if the grid has no more windows. | 99 // Returns true if the grid has no more windows. |
95 bool empty() const { return window_list_.empty(); } | 100 bool empty() const { return window_list_.empty(); } |
96 | 101 |
97 // Returns how many window selector items are in the grid. | 102 // Returns how many window selector items are in the grid. |
98 size_t size() const { return window_list_.size(); } | 103 size_t size() const { return window_list_.size(); } |
99 | 104 |
100 // Returns true if the selection widget is active. | 105 // Returns true if the selection widget is active. |
101 bool is_selecting() const { return selection_widget_ != nullptr; } | 106 bool is_selecting() const { return selection_widget_ != nullptr; } |
102 | 107 |
103 // Returns the root window in which the grid displays the windows. | 108 // Returns the root window in which the grid displays the windows. |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 | 179 |
175 // Number of columns in the grid. | 180 // Number of columns in the grid. |
176 size_t num_columns_; | 181 size_t num_columns_; |
177 | 182 |
178 DISALLOW_COPY_AND_ASSIGN(WindowGrid); | 183 DISALLOW_COPY_AND_ASSIGN(WindowGrid); |
179 }; | 184 }; |
180 | 185 |
181 } // namespace ash | 186 } // namespace ash |
182 | 187 |
183 #endif // ASH_COMMON_WM_OVERVIEW_WINDOW_GRID_H_ | 188 #endif // ASH_COMMON_WM_OVERVIEW_WINDOW_GRID_H_ |
OLD | NEW |