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

Unified Diff: ash/wm/default_state.cc

Issue 2814243002: Removes a couple more functions from WmWindow (Closed)
Patch Set: feedback Created 3 years, 8 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/container_finder_unittest.cc ('k') | ash/wm/focus_rules.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/default_state.cc
diff --git a/ash/wm/default_state.cc b/ash/wm/default_state.cc
index b8b835c731652d79cb11c30eb79053e1f9752692..f7899c2374785c47f586dd5e74c5efa7c14fceba 100644
--- a/ash/wm/default_state.cc
+++ b/ash/wm/default_state.cc
@@ -18,6 +18,7 @@
#include "ash/wm/wm_event.h"
#include "ash/wm/wm_screen_util.h"
#include "ash/wm_window.h"
+#include "ui/aura/window.h"
#include "ui/display/display.h"
#include "ui/display/screen.h"
@@ -55,12 +56,14 @@ void MoveToDisplayForRestore(WindowState* window_state) {
if (!display_area.Intersects(restore_bounds)) {
const display::Display& display =
display::Screen::GetScreen()->GetDisplayMatching(restore_bounds);
- WmWindow* new_root =
- ShellPort::Get()->GetRootWindowForDisplayId(display.id());
- if (new_root != window_state->window()->GetRootWindow()) {
- WmWindow* new_container = new_root->GetChildByShellWindowId(
- window_state->window()->GetParent()->GetShellWindowId());
- new_container->AddChild(window_state->window());
+ RootWindowController* new_root_controller =
+ Shell::Get()->GetRootWindowControllerWithDisplayId(display.id());
+ if (new_root_controller->GetRootWindow() !=
+ window_state->window()->GetRootWindow()->aura_window()) {
+ aura::Window* new_container =
+ new_root_controller->GetRootWindow()->GetChildById(
+ window_state->window()->GetParent()->aura_window()->id());
+ new_container->AddChild(window_state->window()->aura_window());
}
}
}
« no previous file with comments | « ash/wm/container_finder_unittest.cc ('k') | ash/wm/focus_rules.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698