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_WM_OVERVIEW_WINDOW_GRID_H_ | 5 #ifndef ASH_WM_OVERVIEW_WINDOW_GRID_H_ |
6 #define ASH_WM_OVERVIEW_WINDOW_GRID_H_ | 6 #define ASH_WM_OVERVIEW_WINDOW_GRID_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "ash/wm/overview/window_selector.h" | 10 #include "ash/wm/overview/window_selector.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
59 // this window grid bounds. | 59 // this window grid bounds. |
60 bool Move(WindowSelector::Direction direction); | 60 bool Move(WindowSelector::Direction direction); |
61 | 61 |
62 // Returns the target selected window, or NULL if there is none selected. | 62 // Returns the target selected window, or NULL if there is none selected. |
63 WindowSelectorItem* SelectedWindow() const; | 63 WindowSelectorItem* SelectedWindow() const; |
64 | 64 |
65 // Returns true if a window is contained in any of the WindowSelectorItems | 65 // Returns true if a window is contained in any of the WindowSelectorItems |
66 // this grid owns. | 66 // this grid owns. |
67 bool Contains(const aura::Window* window) const; | 67 bool Contains(const aura::Window* window) const; |
68 | 68 |
69 // Dims the items that do not match the given pattern and prevents their | |
flackr
2014/06/26 17:33:07
nit:s/that do not match the given pattern/whose ti
Nina
2014/06/27 15:20:39
Done.
| |
70 // selection. The pattern has its accents removed and is converted to | |
71 // lowercase in a l10n sensitive context. | |
72 void FilterItems(const base::string16& pattern); | |
73 | |
69 // Returns true if the grid has no more windows. | 74 // Returns true if the grid has no more windows. |
70 bool empty() const { return window_list_.empty(); } | 75 bool empty() const { return window_list_.empty(); } |
71 | 76 |
72 // Returns how many window selector items are in the grid. | 77 // Returns how many window selector items are in the grid. |
73 size_t size() const { return window_list_.size(); } | 78 size_t size() const { return window_list_.size(); } |
74 | 79 |
75 // Returns true if the selection widget is active. | 80 // Returns true if the selection widget is active. |
76 bool is_selecting() const { return selection_widget_ != NULL; } | 81 bool is_selecting() const { return selection_widget_ != NULL; } |
77 | 82 |
78 // Returns the root window in which the grid displays the windows. | 83 // Returns the root window in which the grid displays the windows. |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
117 | 122 |
118 // Vector containing the observed windows. | 123 // Vector containing the observed windows. |
119 std::set<aura::Window*> observed_windows_; | 124 std::set<aura::Window*> observed_windows_; |
120 | 125 |
121 // Widget that indicates to the user which is the selected window. | 126 // Widget that indicates to the user which is the selected window. |
122 scoped_ptr<views::Widget> selection_widget_; | 127 scoped_ptr<views::Widget> selection_widget_; |
123 | 128 |
124 // Current selected window position. | 129 // Current selected window position. |
125 size_t selected_index_; | 130 size_t selected_index_; |
126 | 131 |
132 // Indicates if there is at least one undimmed item in the overview. | |
133 bool has_active_item_; | |
134 | |
127 // Number of columns in the grid. | 135 // Number of columns in the grid. |
128 size_t num_columns_; | 136 size_t num_columns_; |
129 | 137 |
130 DISALLOW_COPY_AND_ASSIGN(WindowGrid); | 138 DISALLOW_COPY_AND_ASSIGN(WindowGrid); |
131 }; | 139 }; |
132 | 140 |
133 } // namespace ash | 141 } // namespace ash |
134 | 142 |
135 #endif // ASH_WM_OVERVIEW_WINDOW_GRID_H_ | 143 #endif // ASH_WM_OVERVIEW_WINDOW_GRID_H_ |
OLD | NEW |