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

Unified Diff: ash/common/wm/container_finder.cc

Issue 2035543004: Shuffles and renames ash/common/wm classes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: random changes for chrome tests Created 4 years, 6 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/common/wm/container_finder.cc
diff --git a/ash/common/wm/container_finder.cc b/ash/common/wm/container_finder.cc
index 197c5fae038ca02f7ae2aba7e066ea932522a7ba..5b19b033c88a3817e42c8d675246f6f204abf24c 100644
--- a/ash/common/wm/container_finder.cc
+++ b/ash/common/wm/container_finder.cc
@@ -8,18 +8,18 @@
#include "ash/common/wm/always_on_top_controller.h"
#include "ash/common/wm/root_window_finder.h"
#include "ash/common/wm/window_state.h"
-#include "ash/common/wm/wm_globals.h"
-#include "ash/common/wm/wm_root_window_controller.h"
-#include "ash/common/wm/wm_window.h"
+#include "ash/common/wm_root_window_controller.h"
+#include "ash/common/wm_shell.h"
+#include "ash/common/wm_window.h"
#include "ui/gfx/geometry/rect.h"
namespace ash {
namespace wm {
namespace {
-WmWindow* FindContainerRoot(WmGlobals* globals, const gfx::Rect& bounds) {
+WmWindow* FindContainerRoot(WmShell* shell, const gfx::Rect& bounds) {
if (bounds == gfx::Rect())
- return globals->GetRootWindowForNewWindows();
+ return shell->GetRootWindowForNewWindows();
return GetRootWindowMatching(bounds);
}
@@ -35,7 +35,7 @@ WmWindow* GetSystemModalContainer(WmWindow* root, WmWindow* window) {
// all modal windows are placed into the normal modal container.
// In case of missing transient parent (it could happen for alerts from
// background pages) assume that the window belongs to user session.
- if (!window->GetGlobals()->IsUserSessionBlocked() ||
+ if (!window->GetShell()->IsUserSessionBlocked() ||
!window->GetTransientParent()) {
return root->GetChildByShellWindowId(kShellWindowId_SystemModalContainer);
}
@@ -74,7 +74,7 @@ WmWindow* GetDefaultParent(WmWindow* context,
// Transient window should use the same root as its transient parent.
target_root = transient_parent->GetRootWindow();
} else {
- target_root = FindContainerRoot(context->GetGlobals(), bounds);
+ target_root = FindContainerRoot(context->GetShell(), bounds);
}
switch (window->GetType()) {

Powered by Google App Engine
This is Rietveld 408576698