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

Unified Diff: ash/root_window_controller.cc

Issue 2739553005: Moves maintaining root_window_for_new_windows_ to Shell (Closed)
Patch Set: remove ash:: Created 3 years, 9 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/root_window_controller.h ('k') | ash/shell.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/root_window_controller.cc
diff --git a/ash/root_window_controller.cc b/ash/root_window_controller.cc
index f621e8057ae19b9a32e3ed749acc0549d112234c..5d666501d9f6090db11795ffab1613d475e0c8ed 100644
--- a/ash/root_window_controller.cc
+++ b/ash/root_window_controller.cc
@@ -324,7 +324,7 @@ RootWindowController* RootWindowController::ForWindow(
// static
RootWindowController* RootWindowController::ForTargetRootWindow() {
CHECK(Shell::HasInstance());
- return GetRootWindowController(Shell::GetTargetRootWindow());
+ return GetRootWindowController(Shell::GetRootWindowForNewWindows());
}
void RootWindowController::ConfigureWidgetInitParamsForContainer(
@@ -1124,18 +1124,17 @@ void RootWindowController::DisableTouchHudProjection() {
}
void RootWindowController::ResetRootForNewWindowsIfNecessary() {
- WmShell* shell = WmShell::Get();
// Change the target root window before closing child windows. If any child
// being removed triggers a relayout of the shelf it will try to build a
// window list adding windows from the target root window's containers which
// may have already gone away.
WmWindow* root = GetWindow();
- if (shell->GetRootWindowForNewWindows() == root) {
+ if (Shell::GetWmRootWindowForNewWindows() == root) {
// The root window for new windows is being destroyed. Switch to the primary
// root window if possible.
- WmWindow* primary_root = shell->GetPrimaryRootWindow();
- shell->set_root_window_for_new_windows(primary_root == root ? nullptr
- : primary_root);
+ WmWindow* primary_root = WmShell::Get()->GetPrimaryRootWindow();
+ Shell::GetInstance()->set_root_window_for_new_windows(
+ primary_root == root ? nullptr : primary_root);
}
}
« no previous file with comments | « ash/root_window_controller.h ('k') | ash/shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698