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

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 (no skipping 1st) 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/common/wm/overview/window_selector.h ('k') | ash/common/wm/overview/window_selector_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7233f45e74b677eeb27623179f90e6d01b0a8843..ea5c3af384082feb9317fc4c8e84b482d230d6ca 100644
--- a/ash/common/wm/overview/window_selector.cc
+++ b/ash/common/wm/overview/window_selector.cc
@@ -404,6 +404,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 =
« no previous file with comments | « ash/common/wm/overview/window_selector.h ('k') | ash/common/wm/overview/window_selector_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698