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

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

Issue 2739553005: Moves maintaining root_window_for_new_windows_ to Shell (Closed)
Patch Set: cleanup 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
Index: ash/common/wm/container_finder.cc
diff --git a/ash/common/wm/container_finder.cc b/ash/common/wm/container_finder.cc
index ece5ca950a23442a1d38eb6d16ff3fbdfaac5336..33d0d5536eed5ebf07a71d9038b37c4fef239c54 100644
--- a/ash/common/wm/container_finder.cc
+++ b/ash/common/wm/container_finder.cc
@@ -13,15 +13,16 @@
#include "ash/public/cpp/shell_window_ids.h"
#include "ash/public/cpp/window_properties.h"
#include "ash/root_window_controller.h"
+#include "ash/shell.h"
#include "ui/gfx/geometry/rect.h"
namespace ash {
namespace wm {
namespace {
-WmWindow* FindContainerRoot(WmShell* shell, const gfx::Rect& bounds) {
+WmWindow* FindContainerRoot(const gfx::Rect& bounds) {
if (bounds == gfx::Rect())
- return shell->GetRootWindowForNewWindows();
+ return Shell::GetInstance()->GetRootWindowForNewWindows();
return GetRootWindowMatching(bounds);
}
@@ -77,7 +78,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->GetShell(), bounds);
+ target_root = FindContainerRoot(bounds);
}
switch (window->GetType()) {

Powered by Google App Engine
This is Rietveld 408576698