OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |