Chromium Code Reviews| 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..db88cbef38d59447b7d922600aa4338347777a3f 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->GetParent()->aura_window(), |
|
sky
2017/03/09 23:31:00
window->parent()->aura_window()?
yiyix
2017/03/10 00:55:57
so sorry, i missed this one.
|
| + 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; |
| } |