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

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

Issue 1059903002: Allow Alt-Tab to move the focus to docked windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 class ASH_EXPORT WindowSelector 49 class ASH_EXPORT WindowSelector
50 : public gfx::DisplayObserver, 50 : public gfx::DisplayObserver,
51 public aura::WindowObserver, 51 public aura::WindowObserver,
52 public aura::client::ActivationChangeObserver, 52 public aura::client::ActivationChangeObserver,
53 public views::TextfieldController { 53 public views::TextfieldController {
54 public: 54 public:
55 // The distance between the top edge of the screen and the bottom edge of 55 // The distance between the top edge of the screen and the bottom edge of
56 // the text filtering textfield. 56 // the text filtering textfield.
57 static const int kTextFilterBottomEdge; 57 static const int kTextFilterBottomEdge;
58 58
59 // Returns true if the window can be selected in overview mode.
60 static bool IsSelectable(aura::Window* window);
61
59 enum Direction { 62 enum Direction {
60 LEFT, 63 LEFT,
61 UP, 64 UP,
62 RIGHT, 65 RIGHT,
63 DOWN 66 DOWN
64 }; 67 };
65 68
66 typedef std::vector<aura::Window*> WindowList; 69 typedef std::vector<aura::Window*> WindowList;
67 typedef ScopedVector<WindowSelectorItem> WindowSelectorItemList; 70 typedef ScopedVector<WindowSelectorItem> WindowSelectorItemList;
68 71
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 112
110 private: 113 private:
111 friend class WindowSelectorTest; 114 friend class WindowSelectorTest;
112 115
113 // Begins positioning windows such that all windows are visible on the screen. 116 // Begins positioning windows such that all windows are visible on the screen.
114 void StartOverview(); 117 void StartOverview();
115 118
116 // Position all of the windows in the overview. 119 // Position all of the windows in the overview.
117 void PositionWindows(bool animate); 120 void PositionWindows(bool animate);
118 121
119 // Hide and track all hidden windows not in the overview item list.
120 void HideAndTrackNonOverviewWindows();
121
122 // |focus|, restores focus to the stored window. 122 // |focus|, restores focus to the stored window.
123 void ResetFocusRestoreWindow(bool focus); 123 void ResetFocusRestoreWindow(bool focus);
124 124
125 // Helper function that moves the selection widget to |direction| on the 125 // Helper function that moves the selection widget to |direction| on the
126 // corresponding window grid. 126 // corresponding window grid.
127 void Move(Direction direction, bool animate); 127 void Move(Direction direction, bool animate);
128 128
129 // Removes all observers that were registered during construction and/or 129 // Removes all observers that were registered during construction and/or
130 // initialization. 130 // initialization.
131 void RemoveAllObservers(); 131 void RemoveAllObservers();
(...skipping 10 matching lines...) Expand all
142 // this window. 142 // this window.
143 aura::Window* restore_focus_window_; 143 aura::Window* restore_focus_window_;
144 144
145 // True when performing operations that may cause window activations. This is 145 // True when performing operations that may cause window activations. This is
146 // used to prevent handling the resulting expected activation. 146 // used to prevent handling the resulting expected activation.
147 bool ignore_activations_; 147 bool ignore_activations_;
148 148
149 // List of all the window overview grids, one for each root window. 149 // List of all the window overview grids, one for each root window.
150 ScopedVector<WindowGrid> grid_list_; 150 ScopedVector<WindowGrid> grid_list_;
151 151
152 // Tracks windows which were hidden because they were not part of the
153 // overview.
154 aura::WindowTracker hidden_windows_;
155
156 // Tracks the index of the root window the selection widget is in. 152 // Tracks the index of the root window the selection widget is in.
157 size_t selected_grid_index_; 153 size_t selected_grid_index_;
158 154
159 // The following variables are used for metric collection purposes. All of 155 // The following variables are used for metric collection purposes. All of
160 // them refer to this particular overview session and are not cumulative: 156 // them refer to this particular overview session and are not cumulative:
161 // The time when overview was started. 157 // The time when overview was started.
162 base::Time overview_start_time_; 158 base::Time overview_start_time_;
163 159
164 // The number of arrow key presses. 160 // The number of arrow key presses.
165 size_t num_key_presses_; 161 size_t num_key_presses_;
(...skipping 19 matching lines...) Expand all
185 // Tracks whether minimized windows are currently being restored for overview 181 // Tracks whether minimized windows are currently being restored for overview
186 // mode. 182 // mode.
187 bool restoring_minimized_windows_; 183 bool restoring_minimized_windows_;
188 184
189 DISALLOW_COPY_AND_ASSIGN(WindowSelector); 185 DISALLOW_COPY_AND_ASSIGN(WindowSelector);
190 }; 186 };
191 187
192 } // namespace ash 188 } // namespace ash
193 189
194 #endif // ASH_WM_OVERVIEW_WINDOW_SELECTOR_H_ 190 #endif // ASH_WM_OVERVIEW_WINDOW_SELECTOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698