| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_grid.h" | 5 #include "ash/common/wm/overview/window_grid.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 735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 746 // from its grid list. | 746 // from its grid list. |
| 747 window_selector_->OnGridEmpty(this); | 747 window_selector_->OnGridEmpty(this); |
| 748 return; | 748 return; |
| 749 } | 749 } |
| 750 | 750 |
| 751 // If selecting, update the selection index. | 751 // If selecting, update the selection index. |
| 752 if (selection_widget_) { | 752 if (selection_widget_) { |
| 753 bool send_focus_alert = selected_index_ == removed_index; | 753 bool send_focus_alert = selected_index_ == removed_index; |
| 754 if (selected_index_ >= removed_index && selected_index_ != 0) | 754 if (selected_index_ >= removed_index && selected_index_ != 0) |
| 755 selected_index_--; | 755 selected_index_--; |
| 756 SelectedWindow()->SetSelected(true); |
| 756 if (send_focus_alert) | 757 if (send_focus_alert) |
| 757 SelectedWindow()->SendAccessibleSelectionEvent(); | 758 SelectedWindow()->SendAccessibleSelectionEvent(); |
| 758 } | 759 } |
| 759 | 760 |
| 760 PositionWindows(true); | 761 PositionWindows(true); |
| 761 } | 762 } |
| 762 | 763 |
| 763 void WindowGrid::OnWindowBoundsChanged(WmWindow* window, | 764 void WindowGrid::OnWindowBoundsChanged(WmWindow* window, |
| 764 const gfx::Rect& old_bounds, | 765 const gfx::Rect& old_bounds, |
| 765 const gfx::Rect& new_bounds) { | 766 const gfx::Rect& new_bounds) { |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 943 *min_right = left; | 944 *min_right = left; |
| 944 if (*max_right < left) | 945 if (*max_right < left) |
| 945 *max_right = left; | 946 *max_right = left; |
| 946 } | 947 } |
| 947 *max_bottom = top + height; | 948 *max_bottom = top + height; |
| 948 } | 949 } |
| 949 return windows_fit; | 950 return windows_fit; |
| 950 } | 951 } |
| 951 | 952 |
| 952 } // namespace ash | 953 } // namespace ash |
| OLD | NEW |