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

Unified Diff: ash/wm/panels/panel_window_resizer.cc

Issue 36473003: Rename StackingClient -> WindowTreeClient (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: done. Created 7 years, 2 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/panels/panel_layout_manager.cc ('k') | ash/wm/stacking_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/panels/panel_window_resizer.cc
diff --git a/ash/wm/panels/panel_window_resizer.cc b/ash/wm/panels/panel_window_resizer.cc
index 03a69f0d5bdda43b604f20c34120736e94b11169..49b356c1d8220b1ef7d64a0b8e175e9267a82e25 100644
--- a/ash/wm/panels/panel_window_resizer.cc
+++ b/ash/wm/panels/panel_window_resizer.cc
@@ -17,6 +17,7 @@
#include "ash/wm/window_util.h"
#include "base/memory/weak_ptr.h"
#include "ui/aura/client/aura_constants.h"
+#include "ui/aura/client/window_tree_client.h"
#include "ui/aura/env.h"
#include "ui/aura/root_window.h"
#include "ui/aura/window.h"
@@ -195,10 +196,11 @@ void PanelWindowResizer::StartedDragging() {
wm::GetWindowState(GetTarget())->set_panel_attached(true);
// We use root window coordinates to ensure that during the drag the panel
// is reparented to a container in the root window that has that window.
- GetTarget()->SetDefaultParentByRootWindow(
- GetTarget()->GetRootWindow(),
- GetTarget()->GetRootWindow()->GetBoundsInScreen());
- wm::ReparentTransientChildrenOfChild(GetTarget()->parent(), GetTarget());
+ aura::Window* target = GetTarget();
+ aura::RootWindow* target_root = target->GetRootWindow();
+ aura::client::ParentWindowWithContext(
+ target, target_root, target_root->GetBoundsInScreen());
+ wm::ReparentTransientChildrenOfChild(target->parent(), target);
}
}
@@ -209,10 +211,11 @@ void PanelWindowResizer::FinishDragging() {
wm::GetWindowState(GetTarget())->set_panel_attached(should_attach_);
// We use last known location to ensure that after the drag the panel
// is reparented to a container in the root window that has that location.
- GetTarget()->SetDefaultParentByRootWindow(
- GetTarget()->GetRootWindow(),
- gfx::Rect(last_location_, gfx::Size()));
- wm::ReparentTransientChildrenOfChild(GetTarget()->parent(), GetTarget());
+ aura::Window* target = GetTarget();
+ aura::RootWindow* target_root = target->GetRootWindow();
+ aura::client::ParentWindowWithContext(
+ target, target_root, gfx::Rect(last_location_, gfx::Size()));
+ wm::ReparentTransientChildrenOfChild(target->parent(), GetTarget());
}
// If we started the drag in one root window and moved into another root
« no previous file with comments | « ash/wm/panels/panel_layout_manager.cc ('k') | ash/wm/stacking_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698