| 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/wm/overview/window_grid.h" | 5 #include "ash/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 607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 618 wm::WindowStateType old_type) { | 618 wm::WindowStateType old_type) { |
| 619 // During preparation, window state can change, e.g. updating shelf | 619 // During preparation, window state can change, e.g. updating shelf |
| 620 // visibility may show the temporarily hidden (minimized) panels. | 620 // visibility may show the temporarily hidden (minimized) panels. |
| 621 if (!prepared_for_overview_) | 621 if (!prepared_for_overview_) |
| 622 return; | 622 return; |
| 623 | 623 |
| 624 wm::WindowStateType new_type = window_state->GetStateType(); | 624 wm::WindowStateType new_type = window_state->GetStateType(); |
| 625 if (IsMinimizedStateType(old_type) == IsMinimizedStateType(new_type)) | 625 if (IsMinimizedStateType(old_type) == IsMinimizedStateType(new_type)) |
| 626 return; | 626 return; |
| 627 | 627 |
| 628 auto iter = | 628 auto iter = std::find_if( |
| 629 std::find_if(window_list_.begin(), window_list_.end(), | 629 window_list_.begin(), window_list_.end(), |
| 630 [window_state](std::unique_ptr<WindowSelectorItem>& item) { | 630 [window_state](std::unique_ptr<WindowSelectorItem>& item) { |
| 631 return item->Contains(window_state->window()); | 631 return item->Contains(WmWindow::Get(window_state->window())); |
| 632 }); | 632 }); |
| 633 if (iter != window_list_.end()) { | 633 if (iter != window_list_.end()) { |
| 634 (*iter)->OnMinimizedStateChanged(); | 634 (*iter)->OnMinimizedStateChanged(); |
| 635 PositionWindows(false); | 635 PositionWindows(false); |
| 636 } | 636 } |
| 637 } | 637 } |
| 638 | 638 |
| 639 void WindowGrid::InitShieldWidget() { | 639 void WindowGrid::InitShieldWidget() { |
| 640 // TODO(varkha): The code assumes that SHELF_BACKGROUND_MAXIMIZED is | 640 // TODO(varkha): The code assumes that SHELF_BACKGROUND_MAXIMIZED is |
| 641 // synonymous with a black shelf background. Update this code if that | 641 // synonymous with a black shelf background. Update this code if that |
| 642 // assumption is no longer valid. | 642 // assumption is no longer valid. |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 834 *min_right = left; | 834 *min_right = left; |
| 835 if (*max_right < left) | 835 if (*max_right < left) |
| 836 *max_right = left; | 836 *max_right = left; |
| 837 } | 837 } |
| 838 *max_bottom = top + height; | 838 *max_bottom = top + height; |
| 839 } | 839 } |
| 840 return windows_fit; | 840 return windows_fit; |
| 841 } | 841 } |
| 842 | 842 |
| 843 } // namespace ash | 843 } // namespace ash |
| OLD | NEW |