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

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

Issue 2667293002: [ash-md] Adds support for gesture to move selection in overview mode (Closed)
Patch Set: [ash-md] Adds support for gesture to move selection in overview mode (tuning) Created 3 years, 10 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_COMMON_WM_OVERVIEW_WINDOW_GRID_H_ 5 #ifndef ASH_COMMON_WM_OVERVIEW_WINDOW_GRID_H_
6 #define ASH_COMMON_WM_OVERVIEW_WINDOW_GRID_H_ 6 #define ASH_COMMON_WM_OVERVIEW_WINDOW_GRID_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 // selected the implementation fades out |selection_widget_| to transparent 98 // selected the implementation fades out |selection_widget_| to transparent
99 // opacity, effectively hiding the selector widget. 99 // opacity, effectively hiding the selector widget.
100 void WindowClosing(WindowSelectorItem* window); 100 void WindowClosing(WindowSelectorItem* window);
101 101
102 // Returns true if the grid has no more windows. 102 // Returns true if the grid has no more windows.
103 bool empty() const { return window_list_.empty(); } 103 bool empty() const { return window_list_.empty(); }
104 104
105 // Returns how many window selector items are in the grid. 105 // Returns how many window selector items are in the grid.
106 size_t size() const { return window_list_.size(); } 106 size_t size() const { return window_list_.size(); }
107 107
108 void set_skip_first(bool skip_first) { skip_first_ = skip_first; }
109
108 // Returns true if the selection widget is active. 110 // Returns true if the selection widget is active.
109 bool is_selecting() const { return selection_widget_ != nullptr; } 111 bool is_selecting() const { return selection_widget_ != nullptr; }
110 112
111 // Returns the root window in which the grid displays the windows. 113 // Returns the root window in which the grid displays the windows.
112 const WmWindow* root_window() const { return root_window_; } 114 const WmWindow* root_window() const { return root_window_; }
113 115
114 const std::vector<std::unique_ptr<WindowSelectorItem>>& window_list() const { 116 const std::vector<std::unique_ptr<WindowSelectorItem>>& window_list() const {
115 return window_list_; 117 return window_list_;
116 } 118 }
117 119
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 185
184 // Current selected window position. 186 // Current selected window position.
185 size_t selected_index_; 187 size_t selected_index_;
186 188
187 // Number of columns in the grid. 189 // Number of columns in the grid.
188 size_t num_columns_; 190 size_t num_columns_;
189 191
190 // True only after all windows have been prepared for overview. 192 // True only after all windows have been prepared for overview.
191 bool prepared_for_overview_; 193 bool prepared_for_overview_;
192 194
195 // True initially for the first non-empty grid and reset to false after
196 // selector has been moved at least once. Always false for all other grids.
197 bool skip_first_;
198
193 DISALLOW_COPY_AND_ASSIGN(WindowGrid); 199 DISALLOW_COPY_AND_ASSIGN(WindowGrid);
194 }; 200 };
195 201
196 } // namespace ash 202 } // namespace ash
197 203
198 #endif // ASH_COMMON_WM_OVERVIEW_WINDOW_GRID_H_ 204 #endif // ASH_COMMON_WM_OVERVIEW_WINDOW_GRID_H_
OLDNEW
« no previous file with comments | « no previous file | ash/common/wm/overview/window_grid.cc » ('j') | ash/common/wm/overview/window_selector.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698