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

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

Issue 2886253002: mash: remove more shell/shelf WmWindow usage. (Closed)
Patch Set: Fix WmShelf::ForWindow. Created 3 years, 7 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 | « ash/wm/mru_window_tracker.cc ('k') | ash/wm/overview/window_selector.cc » ('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/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
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
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
OLDNEW
« no previous file with comments | « ash/wm/mru_window_tracker.cc ('k') | ash/wm/overview/window_selector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698