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 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
464 CancelSelection(); | 464 CancelSelection(); |
465 } | 465 } |
466 | 466 |
467 void WindowSelector::OnAttemptToReactivateWindow(aura::Window* request_active, | 467 void WindowSelector::OnAttemptToReactivateWindow(aura::Window* request_active, |
468 aura::Window* actual_active) { | 468 aura::Window* actual_active) { |
469 OnWindowActivated(request_active, actual_active); | 469 OnWindowActivated(request_active, actual_active); |
470 } | 470 } |
471 | 471 |
472 void WindowSelector::ContentsChanged(views::Textfield* sender, | 472 void WindowSelector::ContentsChanged(views::Textfield* sender, |
473 const base::string16& new_contents) { | 473 const base::string16& new_contents) { |
474 if (CommandLine::ForCurrentProcess()->HasSwitch( | 474 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
475 switches::kAshDisableTextFilteringInOverviewMode)) { | 475 switches::kAshDisableTextFilteringInOverviewMode)) { |
476 return; | 476 return; |
477 } | 477 } |
478 | 478 |
479 text_filter_string_length_ = new_contents.length(); | 479 text_filter_string_length_ = new_contents.length(); |
480 if (!text_filter_string_length_) | 480 if (!text_filter_string_length_) |
481 num_times_textfield_cleared_++; | 481 num_times_textfield_cleared_++; |
482 | 482 |
483 bool should_show_selection_widget = !new_contents.empty(); | 483 bool should_show_selection_widget = !new_contents.empty(); |
484 if (showing_selection_widget_ != should_show_selection_widget) { | 484 if (showing_selection_widget_ != should_show_selection_widget) { |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
581 for (size_t i = 0; | 581 for (size_t i = 0; |
582 i <= grid_list_.size() && | 582 i <= grid_list_.size() && |
583 grid_list_[selected_grid_index_]->Move(direction, animate); i++) { | 583 grid_list_[selected_grid_index_]->Move(direction, animate); i++) { |
584 // TODO(flackr): If there are more than two monitors, move between grids | 584 // TODO(flackr): If there are more than two monitors, move between grids |
585 // in the requested direction. | 585 // in the requested direction. |
586 selected_grid_index_ = (selected_grid_index_ + 1) % grid_list_.size(); | 586 selected_grid_index_ = (selected_grid_index_ + 1) % grid_list_.size(); |
587 } | 587 } |
588 } | 588 } |
589 | 589 |
590 } // namespace ash | 590 } // namespace ash |
OLD | NEW |