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 827 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
838 } | 838 } |
839 // Recompute the transform for the window. | 839 // Recompute the transform for the window. |
840 (*iter)->RecomputeWindowTransforms(); | 840 (*iter)->RecomputeWindowTransforms(); |
841 } | 841 } |
842 | 842 |
843 void WindowGrid::InitShieldWidget() { | 843 void WindowGrid::InitShieldWidget() { |
844 // TODO(varkha): The code assumes that SHELF_BACKGROUND_MAXIMIZED is | 844 // TODO(varkha): The code assumes that SHELF_BACKGROUND_MAXIMIZED is |
845 // synonymous with a black shelf background. Update this code if that | 845 // synonymous with a black shelf background. Update this code if that |
846 // assumption is no longer valid. | 846 // assumption is no longer valid. |
847 const float initial_opacity = | 847 const float initial_opacity = |
848 (root_window_->GetRootWindowController() | 848 (WmShelf::ForWindow(root_window_)->GetBackgroundType() == |
849 ->GetShelf() | 849 SHELF_BACKGROUND_MAXIMIZED) |
850 ->GetBackgroundType() == SHELF_BACKGROUND_MAXIMIZED) | |
851 ? 1.f | 850 ? 1.f |
852 : 0.f; | 851 : 0.f; |
853 shield_widget_.reset(CreateBackgroundWidget( | 852 shield_widget_.reset(CreateBackgroundWidget( |
854 root_window_, kShieldColor, 0, 0, SK_ColorTRANSPARENT, initial_opacity)); | 853 root_window_, kShieldColor, 0, 0, SK_ColorTRANSPARENT, initial_opacity)); |
855 | 854 |
856 WmWindow* widget_window = | 855 WmWindow* widget_window = |
857 WmLookup::Get()->GetWindowForWidget(shield_widget_.get()); | 856 WmLookup::Get()->GetWindowForWidget(shield_widget_.get()); |
858 const gfx::Rect bounds = widget_window->GetParent()->GetBounds(); | 857 const gfx::Rect bounds = widget_window->GetParent()->GetBounds(); |
859 widget_window->SetBounds(bounds); | 858 widget_window->SetBounds(bounds); |
860 widget_window->SetName("OverviewModeShield"); | 859 widget_window->SetName("OverviewModeShield"); |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1057 *min_right = left; | 1056 *min_right = left; |
1058 if (*max_right < left) | 1057 if (*max_right < left) |
1059 *max_right = left; | 1058 *max_right = left; |
1060 } | 1059 } |
1061 *max_bottom = top + height; | 1060 *max_bottom = top + height; |
1062 } | 1061 } |
1063 return windows_fit; | 1062 return windows_fit; |
1064 } | 1063 } |
1065 | 1064 |
1066 } // namespace ash | 1065 } // namespace ash |
OLD | NEW |