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

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

Issue 436713002: Pressing tab in overview should cycle windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add unittest. Created 6 years, 4 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
« no previous file with comments | « no previous file | ash/wm/overview/window_selector_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "ash/wm/overview/window_selector.h" 5 #include "ash/wm/overview/window_selector.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ash/accessibility_delegate.h" 9 #include "ash/accessibility_delegate.h"
10 #include "ash/ash_switches.h" 10 #include "ash/ash_switches.h"
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 break; 295 break;
296 case ui::VKEY_UP: 296 case ui::VKEY_UP:
297 num_key_presses_++; 297 num_key_presses_++;
298 Move(WindowSelector::UP, true); 298 Move(WindowSelector::UP, true);
299 break; 299 break;
300 case ui::VKEY_DOWN: 300 case ui::VKEY_DOWN:
301 num_key_presses_++; 301 num_key_presses_++;
302 Move(WindowSelector::DOWN, true); 302 Move(WindowSelector::DOWN, true);
303 break; 303 break;
304 case ui::VKEY_RIGHT: 304 case ui::VKEY_RIGHT:
305 case ui::VKEY_TAB:
305 num_key_presses_++; 306 num_key_presses_++;
306 Move(WindowSelector::RIGHT, true); 307 Move(WindowSelector::RIGHT, true);
307 break; 308 break;
308 case ui::VKEY_LEFT: 309 case ui::VKEY_LEFT:
309 num_key_presses_++; 310 num_key_presses_++;
310 Move(WindowSelector::LEFT, true); 311 Move(WindowSelector::LEFT, true);
311 break; 312 break;
312 case ui::VKEY_RETURN: 313 case ui::VKEY_RETURN:
313 // Ignore if no item is selected. 314 // Ignore if no item is selected.
314 if (!grid_list_[selected_grid_index_]->is_selecting()) 315 if (!grid_list_[selected_grid_index_]->is_selecting())
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 for (size_t i = 0; 508 for (size_t i = 0;
508 i <= grid_list_.size() && 509 i <= grid_list_.size() &&
509 grid_list_[selected_grid_index_]->Move(direction, animate); i++) { 510 grid_list_[selected_grid_index_]->Move(direction, animate); i++) {
510 // TODO(flackr): If there are more than two monitors, move between grids 511 // TODO(flackr): If there are more than two monitors, move between grids
511 // in the requested direction. 512 // in the requested direction.
512 selected_grid_index_ = (selected_grid_index_ + 1) % grid_list_.size(); 513 selected_grid_index_ = (selected_grid_index_ + 1) % grid_list_.size();
513 } 514 }
514 } 515 }
515 516
516 } // namespace ash 517 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/wm/overview/window_selector_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698