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

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

Issue 2276853002: [ash-md] Does not cancel overview when focus shifts from text fitler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 3 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
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/common/wm/overview/window_selector.h" 5 #include "ash/common/wm/overview/window_selector.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 #include <set> 9 #include <set>
10 #include <utility> 10 #include <utility>
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 auto grid = 602 auto grid =
603 std::find_if(grid_list_.begin(), grid_list_.end(), 603 std::find_if(grid_list_.begin(), grid_list_.end(),
604 RootWindowGridComparator(gained_active->GetRootWindow())); 604 RootWindowGridComparator(gained_active->GetRootWindow()));
605 if (grid == grid_list_.end()) 605 if (grid == grid_list_.end())
606 return; 606 return;
607 const std::vector<WindowSelectorItem*> windows = (*grid)->window_list(); 607 const std::vector<WindowSelectorItem*> windows = (*grid)->window_list();
608 608
609 auto iter = std::find_if(windows.begin(), windows.end(), 609 auto iter = std::find_if(windows.begin(), windows.end(),
610 WindowSelectorItemTargetComparator(gained_active)); 610 WindowSelectorItemTargetComparator(gained_active));
611 611
612 if (iter != windows.end()) 612 if (iter != windows.end()) {
613 (*iter)->ShowWindowOnExit(); 613 (*iter)->ShowWindowOnExit();
614 } else if (showing_selection_widget_ &&
tdanderson 2016/08/24 14:49:25 What if the string entered into the text filter wi
varkha 2016/08/24 16:53:54 No. |showing_selection_widget_| is indicating visi
tdanderson 2016/08/24 17:43:52 Thanks.
615 lost_active == GetTextFilterWidgetWindow()) {
616 return;
617 }
614 618
615 // Don't restore focus on exit if a window was just activated. 619 // Don't restore focus on exit if a window was just activated.
616 ResetFocusRestoreWindow(false); 620 ResetFocusRestoreWindow(false);
617 CancelSelection(); 621 CancelSelection();
618 } 622 }
619 623
620 void WindowSelector::OnAttemptToReactivateWindow(WmWindow* request_active, 624 void WindowSelector::OnAttemptToReactivateWindow(WmWindow* request_active,
621 WmWindow* actual_active) { 625 WmWindow* actual_active) {
622 OnWindowActivated(request_active, actual_active); 626 OnWindowActivated(request_active, actual_active);
623 } 627 }
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
714 for (size_t i = 0; i <= grid_list_.size() && 718 for (size_t i = 0; i <= grid_list_.size() &&
715 grid_list_[selected_grid_index_]->Move(direction, animate); 719 grid_list_[selected_grid_index_]->Move(direction, animate);
716 i++) { 720 i++) {
717 selected_grid_index_ = 721 selected_grid_index_ =
718 (selected_grid_index_ + display_direction + grid_list_.size()) % 722 (selected_grid_index_ + display_direction + grid_list_.size()) %
719 grid_list_.size(); 723 grid_list_.size();
720 } 724 }
721 } 725 }
722 726
723 } // namespace ash 727 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/wm/overview/window_selector_unittest.cc » ('j') | ash/wm/overview/window_selector_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698