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

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

Issue 2249853009: Don't reposition if shutdown is in progress (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed Created 4 years, 4 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
« no previous file with comments | « no previous file | ash/common/wm/overview/window_selector.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 590 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 ? OverviewAnimationType::OVERVIEW_ANIMATION_LAY_OUT_SELECTOR_ITEMS 601 ? OverviewAnimationType::OVERVIEW_ANIMATION_LAY_OUT_SELECTOR_ITEMS
602 : OverviewAnimationType::OVERVIEW_ANIMATION_NONE); 602 : OverviewAnimationType::OVERVIEW_ANIMATION_NONE);
603 } 603 }
604 604
605 // If the selection widget is active, reposition it without any animation. 605 // If the selection widget is active, reposition it without any animation.
606 if (selection_widget_) 606 if (selection_widget_)
607 MoveSelectionWidgetToTarget(animate); 607 MoveSelectionWidgetToTarget(animate);
608 } 608 }
609 609
610 void WindowGrid::PositionWindows(bool animate) { 610 void WindowGrid::PositionWindows(bool animate) {
611 if (window_selector_->is_shut_down())
612 return;
613
611 if (ash::MaterialDesignController::IsOverviewMaterial()) { 614 if (ash::MaterialDesignController::IsOverviewMaterial()) {
612 DCHECK(shield_widget_.get()); 615 DCHECK(shield_widget_.get());
613 // Keep the background shield widget covering the whole screen. 616 // Keep the background shield widget covering the whole screen.
614 WmWindow* widget_window = 617 WmWindow* widget_window =
615 WmLookup::Get()->GetWindowForWidget(shield_widget_.get()); 618 WmLookup::Get()->GetWindowForWidget(shield_widget_.get());
616 const gfx::Rect bounds = widget_window->GetParent()->GetBounds(); 619 const gfx::Rect bounds = widget_window->GetParent()->GetBounds();
617 widget_window->SetBounds(bounds); 620 widget_window->SetBounds(bounds);
618 PositionWindowsMD(animate); 621 PositionWindowsMD(animate);
619 return; 622 return;
620 } 623 }
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
1048 *min_right = left; 1051 *min_right = left;
1049 if (*max_right < left) 1052 if (*max_right < left)
1050 *max_right = left; 1053 *max_right = left;
1051 } 1054 }
1052 *max_bottom = top + height; 1055 *max_bottom = top + height;
1053 } 1056 }
1054 return windows_fit; 1057 return windows_fit;
1055 } 1058 }
1056 1059
1057 } // namespace ash 1060 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/common/wm/overview/window_selector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698