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

Unified Diff: ash/wm/window_cycle_list.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/wm/window_cycle_controller_unittest.cc ('k') | ash/wm/window_positioner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/window_cycle_list.cc
diff --git a/ash/wm/window_cycle_list.cc b/ash/wm/window_cycle_list.cc
index 21255482d8c5e2470c71d2c8a381c546dff95123..041efcf43efa4e27189bf3bd291b3fde61b7bbf4 100644
--- a/ash/wm/window_cycle_list.cc
+++ b/ash/wm/window_cycle_list.cc
@@ -534,10 +534,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);
« no previous file with comments | « ash/wm/window_cycle_controller_unittest.cc ('k') | ash/wm/window_positioner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698