Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(212)

Side by Side Diff: ash/wm/overview/window_grid.h

Issue 358553004: Added text filtering to Overview Mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
70 // selection.
71 void Filter(const base::string16& pattern);
tdanderson 2014/06/25 15:48:23 I'd prefer a slightly more descriptive name such a
Nina 2014/06/26 15:20:17 Done.
72
69 // Returns true if the grid has no more windows. 73 // Returns true if the grid has no more windows.
70 bool empty() const { return window_list_.empty(); } 74 bool empty() const { return window_list_.empty(); }
71 75
72 // Returns how many window selector items are in the grid. 76 // Returns how many window selector items are in the grid.
73 size_t size() const { return window_list_.size(); } 77 size_t size() const { return window_list_.size(); }
74 78
75 // Returns true if the selection widget is active. 79 // Returns true if the selection widget is active.
76 bool is_selecting() const { return selection_widget_ != NULL; } 80 bool is_selecting() const { return selection_widget_ != NULL; }
77 81
78 // Returns the root window in which the grid displays the windows. 82 // Returns the root window in which the grid displays the windows.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 121
118 // Vector containing the observed windows. 122 // Vector containing the observed windows.
119 std::set<aura::Window*> observed_windows_; 123 std::set<aura::Window*> observed_windows_;
120 124
121 // Widget that indicates to the user which is the selected window. 125 // Widget that indicates to the user which is the selected window.
122 scoped_ptr<views::Widget> selection_widget_; 126 scoped_ptr<views::Widget> selection_widget_;
123 127
124 // Current selected window position. 128 // Current selected window position.
125 size_t selected_index_; 129 size_t selected_index_;
126 130
131 // Indicates if there is at least one non filtered item in the overview.
tdanderson 2014/06/25 15:48:23 I notice that you are using four different terms i
Nina 2014/06/26 15:20:17 The echoes of my English teacher - don't repeat th
132 bool item_active_;
tdanderson 2014/06/25 15:48:23 I would re-name to be more descriptive, e.g., some
Nina 2014/06/26 15:20:17 Done.
133
127 // Number of columns in the grid. 134 // Number of columns in the grid.
128 size_t num_columns_; 135 size_t num_columns_;
129 136
130 DISALLOW_COPY_AND_ASSIGN(WindowGrid); 137 DISALLOW_COPY_AND_ASSIGN(WindowGrid);
131 }; 138 };
132 139
133 } // namespace ash 140 } // namespace ash
134 141
135 #endif // ASH_WM_OVERVIEW_WINDOW_GRID_H_ 142 #endif // ASH_WM_OVERVIEW_WINDOW_GRID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698