Chromium Code Reviews| 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 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 449 } | 449 } |
| 450 | 450 |
| 451 void WindowGrid::PrepareForOverview() { | 451 void WindowGrid::PrepareForOverview() { |
| 452 if (ash::MaterialDesignController::IsOverviewMaterial()) | 452 if (ash::MaterialDesignController::IsOverviewMaterial()) |
| 453 InitShieldWidget(); | 453 InitShieldWidget(); |
| 454 for (auto iter = window_list_.begin(); iter != window_list_.end(); ++iter) | 454 for (auto iter = window_list_.begin(); iter != window_list_.end(); ++iter) |
| 455 (*iter)->PrepareForOverview(); | 455 (*iter)->PrepareForOverview(); |
| 456 } | 456 } |
| 457 | 457 |
| 458 void WindowGrid::PositionWindowsMD(bool animate) { | 458 void WindowGrid::PositionWindowsMD(bool animate) { |
| 459 if (window_list_.empty()) | 459 if (window_list_.empty() || window_selector_->shutdown()) |
|
varkha
2016/08/17 21:49:31
Should this early exit be in PositionWindows() ins
oshima
2016/08/17 22:00:26
Done.
| |
| 460 return; | 460 return; |
| 461 | 461 |
| 462 const int kUnlimited = -1; | 462 const int kUnlimited = -1; |
| 463 const size_t windows_count = window_list_.size(); | 463 const size_t windows_count = window_list_.size(); |
| 464 const base::CommandLine* command_line = | 464 const base::CommandLine* command_line = |
| 465 base::CommandLine::ForCurrentProcess(); | 465 base::CommandLine::ForCurrentProcess(); |
| 466 int windows_to_use_masks = kMaxWindowsCountToHideHeaderWithMasks; | 466 int windows_to_use_masks = kMaxWindowsCountToHideHeaderWithMasks; |
| 467 if (command_line->HasSwitch(switches::kAshMaxWindowsToUseMaskInOverview) && | 467 if (command_line->HasSwitch(switches::kAshMaxWindowsToUseMaskInOverview) && |
| 468 (!base::StringToInt(command_line->GetSwitchValueASCII( | 468 (!base::StringToInt(command_line->GetSwitchValueASCII( |
| 469 switches::kAshMaxWindowsToUseMaskInOverview), | 469 switches::kAshMaxWindowsToUseMaskInOverview), |
| (...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1048 *min_right = left; | 1048 *min_right = left; |
| 1049 if (*max_right < left) | 1049 if (*max_right < left) |
| 1050 *max_right = left; | 1050 *max_right = left; |
| 1051 } | 1051 } |
| 1052 *max_bottom = top + height; | 1052 *max_bottom = top + height; |
| 1053 } | 1053 } |
| 1054 return windows_fit; | 1054 return windows_fit; |
| 1055 } | 1055 } |
| 1056 | 1056 |
| 1057 } // namespace ash | 1057 } // namespace ash |
| OLD | NEW |