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 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
635 (*iter)->OnMinimizedStateChanged(); | 635 (*iter)->OnMinimizedStateChanged(); |
636 PositionWindows(false); | 636 PositionWindows(false); |
637 } | 637 } |
638 } | 638 } |
639 | 639 |
640 void WindowGrid::InitShieldWidget() { | 640 void WindowGrid::InitShieldWidget() { |
641 // TODO(varkha): The code assumes that SHELF_BACKGROUND_MAXIMIZED is | 641 // TODO(varkha): The code assumes that SHELF_BACKGROUND_MAXIMIZED is |
642 // synonymous with a black shelf background. Update this code if that | 642 // synonymous with a black shelf background. Update this code if that |
643 // assumption is no longer valid. | 643 // assumption is no longer valid. |
644 const float initial_opacity = | 644 const float initial_opacity = |
645 (WmShelf::ForWindow(root_window_)->GetBackgroundType() == | 645 (WmShelf::ForWindow(root_window_->aura_window())->GetBackgroundType() == |
646 SHELF_BACKGROUND_MAXIMIZED) | 646 SHELF_BACKGROUND_MAXIMIZED) |
647 ? 1.f | 647 ? 1.f |
648 : 0.f; | 648 : 0.f; |
649 shield_widget_.reset( | 649 shield_widget_.reset( |
650 CreateBackgroundWidget(root_window_, ui::LAYER_SOLID_COLOR, kShieldColor, | 650 CreateBackgroundWidget(root_window_, ui::LAYER_SOLID_COLOR, kShieldColor, |
651 0, 0, SK_ColorTRANSPARENT, initial_opacity)); | 651 0, 0, SK_ColorTRANSPARENT, initial_opacity)); |
652 WmWindow* widget_window = WmWindow::Get(shield_widget_->GetNativeWindow()); | 652 WmWindow* widget_window = WmWindow::Get(shield_widget_->GetNativeWindow()); |
653 const gfx::Rect bounds = widget_window->GetParent()->GetBounds(); | 653 const gfx::Rect bounds = widget_window->GetParent()->GetBounds(); |
654 widget_window->SetBounds(bounds); | 654 widget_window->SetBounds(bounds); |
655 widget_window->aura_window()->SetName("OverviewModeShield"); | 655 widget_window->aura_window()->SetName("OverviewModeShield"); |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
835 *min_right = left; | 835 *min_right = left; |
836 if (*max_right < left) | 836 if (*max_right < left) |
837 *max_right = left; | 837 *max_right = left; |
838 } | 838 } |
839 *max_bottom = top + height; | 839 *max_bottom = top + height; |
840 } | 840 } |
841 return windows_fit; | 841 return windows_fit; |
842 } | 842 } |
843 | 843 |
844 } // namespace ash | 844 } // namespace ash |
OLD | NEW |