| 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 // Fades out selector widget to transparent opacity effectively hiding it. |
| 95 void HideSelector(); |
| 96 |
| 94 // Returns true if the grid has no more windows. | 97 // Returns true if the grid has no more windows. |
| 95 bool empty() const { return window_list_.empty(); } | 98 bool empty() const { return window_list_.empty(); } |
| 96 | 99 |
| 97 // Returns how many window selector items are in the grid. | 100 // Returns how many window selector items are in the grid. |
| 98 size_t size() const { return window_list_.size(); } | 101 size_t size() const { return window_list_.size(); } |
| 99 | 102 |
| 100 // Returns true if the selection widget is active. | 103 // Returns true if the selection widget is active. |
| 101 bool is_selecting() const { return selection_widget_ != nullptr; } | 104 bool is_selecting() const { return selection_widget_ != nullptr; } |
| 102 | 105 |
| 103 // Returns the root window in which the grid displays the windows. | 106 // 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 | 177 |
| 175 // Number of columns in the grid. | 178 // Number of columns in the grid. |
| 176 size_t num_columns_; | 179 size_t num_columns_; |
| 177 | 180 |
| 178 DISALLOW_COPY_AND_ASSIGN(WindowGrid); | 181 DISALLOW_COPY_AND_ASSIGN(WindowGrid); |
| 179 }; | 182 }; |
| 180 | 183 |
| 181 } // namespace ash | 184 } // namespace ash |
| 182 | 185 |
| 183 #endif // ASH_COMMON_WM_OVERVIEW_WINDOW_GRID_H_ | 186 #endif // ASH_COMMON_WM_OVERVIEW_WINDOW_GRID_H_ |
| OLD | NEW |