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

Unified Diff: ash/wm/window_cycle_list.cc

Issue 2886253002: mash: remove more shell/shelf WmWindow usage. (Closed)
Patch Set: Sync and rebase. 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 side-by-side diff with in-line comments
Download patch
Index: ash/wm/window_cycle_list.cc
diff --git a/ash/wm/window_cycle_list.cc b/ash/wm/window_cycle_list.cc
index fe1e701b2299965a276203a240f3cb9e8e16de5f..80cb1b4e1e1d2d1c311bc03de58213aadeac1242 100644
--- a/ash/wm/window_cycle_list.cc
+++ b/ash/wm/window_cycle_list.cc
@@ -532,10 +532,13 @@ void WindowCycleList::InitWindowCycleView() {
params.name = "WindowCycleList (Alt+Tab)";
// TODO(estade): make sure nothing untoward happens when the lock screen
// or a system modal dialog is shown.
- WmWindow* root_window = Shell::GetWmRootWindowForNewWindows();
- root_window->GetRootWindowController()->ConfigureWidgetInitParamsForContainer(
- widget, kShellWindowId_OverlayContainer, &params);
- gfx::Rect widget_rect = root_window->GetDisplayNearestWindow().bounds();
+ aura::Window* root_window = Shell::GetRootWindowForNewWindows();
+ GetRootWindowController(root_window)
+ ->ConfigureWidgetInitParamsForContainer(
+ widget, kShellWindowId_OverlayContainer, &params);
+ gfx::Rect widget_rect = display::Screen::GetScreen()
+ ->GetDisplayNearestWindow(root_window)
+ .bounds();
const int widget_height = cycle_view_->GetPreferredSize().height();
widget_rect.set_y(widget_rect.y() +
(widget_rect.height() - widget_height) / 2);

Powered by Google App Engine
This is Rietveld 408576698