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

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

Issue 2252833004: Don't reposition if shutdown is in progress (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: 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 589 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 ? OverviewAnimationType::OVERVIEW_ANIMATION_LAY_OUT_SELECTOR_ITEMS 600 ? OverviewAnimationType::OVERVIEW_ANIMATION_LAY_OUT_SELECTOR_ITEMS
601 : OverviewAnimationType::OVERVIEW_ANIMATION_NONE); 601 : OverviewAnimationType::OVERVIEW_ANIMATION_NONE);
602 } 602 }
603 603
604 // If the selection widget is active, reposition it without any animation. 604 // If the selection widget is active, reposition it without any animation.
605 if (selection_widget_) 605 if (selection_widget_)
606 MoveSelectionWidgetToTarget(animate); 606 MoveSelectionWidgetToTarget(animate);
607 } 607 }
608 608
609 void WindowGrid::PositionWindows(bool animate) { 609 void WindowGrid::PositionWindows(bool animate) {
610 if (window_selector_->is_shut_down())
611 return;
612
610 if (ash::MaterialDesignController::IsOverviewMaterial()) { 613 if (ash::MaterialDesignController::IsOverviewMaterial()) {
611 DCHECK(shield_widget_.get()); 614 DCHECK(shield_widget_.get());
612 // Keep the background shield widget covering the whole screen. 615 // Keep the background shield widget covering the whole screen.
613 WmWindow* widget_window = 616 WmWindow* widget_window =
614 WmLookup::Get()->GetWindowForWidget(shield_widget_.get()); 617 WmLookup::Get()->GetWindowForWidget(shield_widget_.get());
615 const gfx::Rect bounds = widget_window->GetParent()->GetBounds(); 618 const gfx::Rect bounds = widget_window->GetParent()->GetBounds();
616 widget_window->SetBounds(bounds); 619 widget_window->SetBounds(bounds);
617 PositionWindowsMD(animate); 620 PositionWindowsMD(animate);
618 return; 621 return;
619 } 622 }
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
1016 *min_right = left; 1019 *min_right = left;
1017 if (*max_right < left) 1020 if (*max_right < left)
1018 *max_right = left; 1021 *max_right = left;
1019 } 1022 }
1020 *max_bottom = top + height; 1023 *max_bottom = top + height;
1021 } 1024 }
1022 return windows_fit; 1025 return windows_fit;
1023 } 1026 }
1024 1027
1025 } // namespace ash 1028 } // 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