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

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

Issue 403493006: Visual improvements to text filtering in Ash overview mode (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_SELECTOR_H_ 5 #ifndef ASH_WM_OVERVIEW_WINDOW_SELECTOR_H_
6 #define ASH_WM_OVERVIEW_WINDOW_SELECTOR_H_ 6 #define ASH_WM_OVERVIEW_WINDOW_SELECTOR_H_
7 7
8 #include <set> 8 #include <set>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 DOWN 59 DOWN
60 }; 60 };
61 61
62 typedef std::vector<aura::Window*> WindowList; 62 typedef std::vector<aura::Window*> WindowList;
63 typedef ScopedVector<WindowSelectorItem> WindowSelectorItemList; 63 typedef ScopedVector<WindowSelectorItem> WindowSelectorItemList;
64 64
65 WindowSelector(const WindowList& windows, 65 WindowSelector(const WindowList& windows,
66 WindowSelectorDelegate* delegate); 66 WindowSelectorDelegate* delegate);
67 virtual ~WindowSelector(); 67 virtual ~WindowSelector();
68 68
69 // Returns the height of the textfield used for text filtering.
70 int TextFilterHeight() const;
71
69 // Cancels window selection. 72 // Cancels window selection.
70 void CancelSelection(); 73 void CancelSelection();
71 74
72 // Called when the last window selector item from a grid is deleted. 75 // Called when the last window selector item from a grid is deleted.
73 void OnGridEmpty(WindowGrid* grid); 76 void OnGridEmpty(WindowGrid* grid);
74 77
75 // gfx::DisplayObserver: 78 // gfx::DisplayObserver:
76 virtual void OnDisplayAdded(const gfx::Display& display) OVERRIDE; 79 virtual void OnDisplayAdded(const gfx::Display& display) OVERRIDE;
77 virtual void OnDisplayRemoved(const gfx::Display& display) OVERRIDE; 80 virtual void OnDisplayRemoved(const gfx::Display& display) OVERRIDE;
78 virtual void OnDisplayMetricsChanged(const gfx::Display& display, 81 virtual void OnDisplayMetricsChanged(const gfx::Display& display,
(...skipping 28 matching lines...) Expand all
107 // Hide and track all hidden windows not in the overview item list. 110 // Hide and track all hidden windows not in the overview item list.
108 void HideAndTrackNonOverviewWindows(); 111 void HideAndTrackNonOverviewWindows();
109 112
110 // |focus|, restores focus to the stored window. 113 // |focus|, restores focus to the stored window.
111 void ResetFocusRestoreWindow(bool focus); 114 void ResetFocusRestoreWindow(bool focus);
112 115
113 // Helper function that moves the selection widget to |direction| on the 116 // Helper function that moves the selection widget to |direction| on the
114 // corresponding window grid. 117 // corresponding window grid.
115 void Move(Direction direction, bool animate); 118 void Move(Direction direction, bool animate);
116 119
120 // Instantiates and returns the widget hosting the textfield used in
121 // text filtering.
122 views::Widget* CreateTextFilter(views::TextfieldController* controller,
123 aura::Window* root_window);
124
117 // Tracks observed windows. 125 // Tracks observed windows.
118 std::set<aura::Window*> observed_windows_; 126 std::set<aura::Window*> observed_windows_;
119 127
120 // Weak pointer to the selector delegate which will be called when a 128 // Weak pointer to the selector delegate which will be called when a
121 // selection is made. 129 // selection is made.
122 WindowSelectorDelegate* delegate_; 130 WindowSelectorDelegate* delegate_;
123 131
124 // A weak pointer to the window which was focused on beginning window 132 // A weak pointer to the window which was focused on beginning window
125 // selection. If window selection is canceled the focus should be restored to 133 // selection. If window selection is canceled the focus should be restored to
126 // this window. 134 // this window.
(...skipping 25 matching lines...) Expand all
152 size_t num_items_; 160 size_t num_items_;
153 161
154 // Indicates if we are showing the selection widget. 162 // Indicates if we are showing the selection widget.
155 bool showing_selection_widget_; 163 bool showing_selection_widget_;
156 164
157 // Window text filter widget. As the user writes on it, we filter the items 165 // Window text filter widget. As the user writes on it, we filter the items
158 // in the overview. It is also responsible for handling overview key events, 166 // in the overview. It is also responsible for handling overview key events,
159 // such as enter key to select. 167 // such as enter key to select.
160 scoped_ptr<views::Widget> text_filter_widget_; 168 scoped_ptr<views::Widget> text_filter_widget_;
161 169
170 // The height in pixels of the text used in text filtering.
171 int text_height_;
172
162 DISALLOW_COPY_AND_ASSIGN(WindowSelector); 173 DISALLOW_COPY_AND_ASSIGN(WindowSelector);
163 }; 174 };
164 175
165 } // namespace ash 176 } // namespace ash
166 177
167 #endif // ASH_WM_OVERVIEW_WINDOW_SELECTOR_H_ 178 #endif // ASH_WM_OVERVIEW_WINDOW_SELECTOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698