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

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: Fixed unittest Created 6 years, 5 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 const std::vector<aura::Window*>& window_list, 50 const std::vector<aura::Window*>& window_list,
51 WindowSelector* window_selector); 51 WindowSelector* window_selector);
52 virtual ~WindowGrid(); 52 virtual ~WindowGrid();
53 53
54 // Positions all the windows in the grid. 54 // Positions all the windows in the grid.
55 void PositionWindows(bool animate); 55 void PositionWindows(bool animate);
56 56
57 // Updates |selected_index_| according to the specified |direction| and calls 57 // Updates |selected_index_| according to the specified |direction| and calls
58 // MoveSelectionWidget(). Returns |true| if the new selection index is out of 58 // MoveSelectionWidget(). Returns |true| if the new selection index is out of
59 // this window grid bounds. 59 // this window grid bounds.
60 bool Move(WindowSelector::Direction direction); 60 bool Move(WindowSelector::Direction direction, bool animate);
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 whose titles do not contain |pattern| and prevents their
70 // selection. The pattern has its accents removed and is converted to
71 // lowercase in a l10n sensitive context.
72 // If |pattern| is empty, no item is dimmed.
73 void FilterItems(const base::string16& pattern);
74
69 // Returns true if the grid has no more windows. 75 // Returns true if the grid has no more windows.
70 bool empty() const { return window_list_.empty(); } 76 bool empty() const { return window_list_.empty(); }
71 77
72 // Returns how many window selector items are in the grid. 78 // Returns how many window selector items are in the grid.
73 size_t size() const { return window_list_.size(); } 79 size_t size() const { return window_list_.size(); }
74 80
75 // Returns true if the selection widget is active. 81 // Returns true if the selection widget is active.
76 bool is_selecting() const { return selection_widget_ != NULL; } 82 bool is_selecting() const { return selection_widget_ != NULL; }
77 83
78 // Returns the root window in which the grid displays the windows. 84 // Returns the root window in which the grid displays the windows.
(...skipping 12 matching lines...) Expand all
91 97
92 private: 98 private:
93 friend class WindowSelectorTest; 99 friend class WindowSelectorTest;
94 100
95 // Internal function to initialize the selection widget. 101 // Internal function to initialize the selection widget.
96 void InitSelectionWidget(WindowSelector::Direction direction); 102 void InitSelectionWidget(WindowSelector::Direction direction);
97 103
98 // Moves the selection widget to the specified |direction|. 104 // Moves the selection widget to the specified |direction|.
99 void MoveSelectionWidget(WindowSelector::Direction direction, 105 void MoveSelectionWidget(WindowSelector::Direction direction,
100 bool recreate_selection_widget, 106 bool recreate_selection_widget,
101 bool out_of_bounds); 107 bool out_of_bounds,
108 bool animate);
102 109
103 // Moves the selection widget to the targeted window. 110 // Moves the selection widget to the targeted window.
104 void MoveSelectionWidgetToTarget(bool animate); 111 void MoveSelectionWidgetToTarget(bool animate);
105 112
106 // Returns the target bounds of the currently selected item. 113 // Returns the target bounds of the currently selected item.
107 const gfx::Rect GetSelectionBounds() const; 114 const gfx::Rect GetSelectionBounds() const;
108 115
109 // Root window the grid is in. 116 // Root window the grid is in.
110 aura::Window* root_window_; 117 aura::Window* root_window_;
111 118
(...skipping 14 matching lines...) Expand all
126 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