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 #include <set> | 8 #include <set> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
504 CancelSelection(); | 504 CancelSelection(); |
505 } | 505 } |
506 | 506 |
507 void WindowSelector::OnAttemptToReactivateWindow(aura::Window* request_active, | 507 void WindowSelector::OnAttemptToReactivateWindow(aura::Window* request_active, |
508 aura::Window* actual_active) { | 508 aura::Window* actual_active) { |
509 OnWindowActivated(request_active, actual_active); | 509 OnWindowActivated(request_active, actual_active); |
510 } | 510 } |
511 | 511 |
512 void WindowSelector::ContentsChanged(views::Textfield* sender, | 512 void WindowSelector::ContentsChanged(views::Textfield* sender, |
513 const base::string16& new_contents) { | 513 const base::string16& new_contents) { |
514 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | |
515 switches::kAshDisableTextFilteringInOverviewMode)) { | |
516 return; | |
517 } | |
518 | |
519 text_filter_string_length_ = new_contents.length(); | 514 text_filter_string_length_ = new_contents.length(); |
520 if (!text_filter_string_length_) | 515 if (!text_filter_string_length_) |
521 num_times_textfield_cleared_++; | 516 num_times_textfield_cleared_++; |
522 | 517 |
523 bool should_show_selection_widget = !new_contents.empty(); | 518 bool should_show_selection_widget = !new_contents.empty(); |
524 if (showing_selection_widget_ != should_show_selection_widget) { | 519 if (showing_selection_widget_ != should_show_selection_widget) { |
525 ui::ScopedLayerAnimationSettings animation_settings( | 520 ui::ScopedLayerAnimationSettings animation_settings( |
526 text_filter_widget_->GetNativeWindow()->layer()->GetAnimator()); | 521 text_filter_widget_->GetNativeWindow()->layer()->GetAnimator()); |
527 animation_settings.SetPreemptionStrategy( | 522 animation_settings.SetPreemptionStrategy( |
528 ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET); | 523 ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET); |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
618 for (size_t i = 0; | 613 for (size_t i = 0; |
619 i <= grid_list_.size() && | 614 i <= grid_list_.size() && |
620 grid_list_[selected_grid_index_]->Move(direction, animate); i++) { | 615 grid_list_[selected_grid_index_]->Move(direction, animate); i++) { |
621 // TODO(flackr): If there are more than two monitors, move between grids | 616 // TODO(flackr): If there are more than two monitors, move between grids |
622 // in the requested direction. | 617 // in the requested direction. |
623 selected_grid_index_ = (selected_grid_index_ + 1) % grid_list_.size(); | 618 selected_grid_index_ = (selected_grid_index_ + 1) % grid_list_.size(); |
624 } | 619 } |
625 } | 620 } |
626 | 621 |
627 } // namespace ash | 622 } // namespace ash |
OLD | NEW |