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

Unified Diff: ash/common/wm/dock/docked_window_resizer.cc

Issue 2737213002: Update window_parenting_utils to use aura::window (Closed)
Patch Set: fix nits 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/common/wm/dock/docked_window_layout_manager.cc ('k') | ash/common/wm/panels/panel_layout_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/wm/dock/docked_window_resizer.cc
diff --git a/ash/common/wm/dock/docked_window_resizer.cc b/ash/common/wm/dock/docked_window_resizer.cc
index f2ea238d33dc9ccd9be4789d6c6a8374a2bab216..e50ecd03be72a07a4af2ce0fd043e8bd7f7a2bf2 100644
--- a/ash/common/wm/dock/docked_window_resizer.cc
+++ b/ash/common/wm/dock/docked_window_resizer.cc
@@ -188,8 +188,9 @@ void DockedWindowResizer::StartedDragging(
WmWindow* docked_container =
GetTarget()->GetRootWindow()->GetChildByShellWindowId(
kShellWindowId_DockedContainer);
- wm::ReparentChildWithTransientChildren(
- GetTarget(), GetTarget()->GetParent(), docked_container);
+ wm::ReparentChildWithTransientChildren(GetTarget()->aura_window(),
+ GetTarget()->aura_window()->parent(),
+ docked_container->aura_window());
if (!resizer)
return;
}
@@ -266,8 +267,9 @@ DockedAction DockedWindowResizer::MaybeReparentWindowOnDragCompletion(
if ((is_resized || !is_attached_panel) &&
is_docked_ != (window->GetParent() == dock_container)) {
if (is_docked_) {
- wm::ReparentChildWithTransientChildren(window, window->GetParent(),
- dock_container);
+ wm::ReparentChildWithTransientChildren(window->aura_window(),
+ window->aura_window()->parent(),
+ dock_container->aura_window());
action = DOCKED_ACTION_DOCK;
} else if (window->GetParent()->GetShellWindowId() ==
kShellWindowId_DockedContainer) {
@@ -279,11 +281,12 @@ DockedAction DockedWindowResizer::MaybeReparentWindowOnDragCompletion(
// mouse is).
gfx::Rect near_last_location(last_location_, gfx::Size());
// Reparenting will cause Relayout and possible dock shrinking.
- WmWindow* previous_parent = window->GetParent();
+ aura::Window* previous_parent = window->aura_window()->parent();
window->SetParentUsingContext(window, near_last_location);
- if (window->GetParent() != previous_parent) {
- wm::ReparentTransientChildrenOfChild(window, previous_parent,
- window->GetParent());
+ if (window->aura_window()->parent() != previous_parent) {
+ wm::ReparentTransientChildrenOfChild(window->aura_window(),
+ previous_parent,
+ window->aura_window()->parent());
}
action = was_docked_ ? DOCKED_ACTION_UNDOCK : DOCKED_ACTION_NONE;
}
« no previous file with comments | « ash/common/wm/dock/docked_window_layout_manager.cc ('k') | ash/common/wm/panels/panel_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698