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

Unified Diff: ash/common/wm/overview/window_selector.cc

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 Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: ash/common/wm/overview/window_selector.cc
diff --git a/ash/common/wm/overview/window_selector.cc b/ash/common/wm/overview/window_selector.cc
index 3fae96feafa4e82bca4d7ec5dec01253a9847f3c..d2a402c7e2e997ad72acb92c42de9234331b076c 100644
--- a/ash/common/wm/overview/window_selector.cc
+++ b/ash/common/wm/overview/window_selector.cc
@@ -407,6 +407,20 @@ void WindowSelector::OnGridEmpty(WindowGrid* grid) {
CancelSelection();
}
+void WindowSelector::IncrementSelection(int increment) {
+ const Direction direction =
+ increment > 0 ? WindowSelector::RIGHT : WindowSelector::LEFT;
+ for (int step = 0; step < abs(increment); ++step)
+ Move(direction, true);
+}
+
+bool WindowSelector::AcceptSelection() {
+ if (!grid_list_[selected_grid_index_]->is_selecting())
+ return false;
+ SelectWindow(grid_list_[selected_grid_index_]->SelectedWindow());
+ return true;
+}
+
void WindowSelector::SelectWindow(WindowSelectorItem* item) {
WmWindow* window = item->GetWindow();
std::vector<WmWindow*> window_list =

Powered by Google App Engine
This is Rietveld 408576698