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

Unified Diff: ash/wm/dock/docked_window_layout_manager.cc

Issue 1901773002: Removes most of aura dependencies from DefaultState (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@wm_window_positioner
Patch Set: nit and merge Created 4 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/default_state.cc ('k') | ash/wm/dock/docked_window_resizer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/dock/docked_window_layout_manager.cc
diff --git a/ash/wm/dock/docked_window_layout_manager.cc b/ash/wm/dock/docked_window_layout_manager.cc
index facbdbf8e5d4ca74d95dc1f23cf7af0771826ed5..6d318aec8cf90a697daa51b9bc416bbac52dad0a 100644
--- a/ash/wm/dock/docked_window_layout_manager.cc
+++ b/ash/wm/dock/docked_window_layout_manager.cc
@@ -13,6 +13,8 @@
#include "ash/shelf/shelf_widget.h"
#include "ash/shell.h"
#include "ash/shell_window_ids.h"
+#include "ash/wm/common/window_animation_types.h"
+#include "ash/wm/common/window_parenting_utils.h"
#include "ash/wm/coordinate_conversion.h"
#include "ash/wm/window_animations.h"
#include "ash/wm/window_properties.h"
@@ -244,8 +246,11 @@ void UndockWindow(aura::Window* window) {
gfx::Rect previous_bounds = window->bounds();
aura::Window* old_parent = window->parent();
aura::client::ParentWindowWithContext(window, window, gfx::Rect());
- if (window->parent() != old_parent)
- wm::ReparentTransientChildrenOfChild(window, old_parent, window->parent());
+ if (window->parent() != old_parent) {
+ wm::ReparentTransientChildrenOfChild(
+ wm::WmWindowAura::Get(window), wm::WmWindowAura::Get(old_parent),
+ wm::WmWindowAura::Get(window->parent()));
+ }
// Start maximize or fullscreen (affecting packaged apps) animation from
// previous window bounds.
window->layer()->SetBounds(previous_bounds);
@@ -432,7 +437,7 @@ DockedWindowLayoutManager::DockedWindowLayoutManager(
shelf_(nullptr),
workspace_controller_(workspace_controller),
in_fullscreen_(workspace_controller_->GetWindowState() ==
- WORKSPACE_WINDOW_STATE_FULL_SCREEN),
+ wm::WORKSPACE_WINDOW_STATE_FULL_SCREEN),
docked_width_(0),
alignment_(DOCKED_ALIGNMENT_NONE),
preferred_alignment_(DOCKED_ALIGNMENT_NONE),
@@ -792,7 +797,7 @@ void DockedWindowLayoutManager::OnFullscreenStateChanged(
return;
// Entering fullscreen mode (including immersive) hides docked windows.
in_fullscreen_ = workspace_controller_->GetWindowState() ==
- WORKSPACE_WINDOW_STATE_FULL_SCREEN;
+ wm::WORKSPACE_WINDOW_STATE_FULL_SCREEN;
{
// prevent Relayout from getting called multiple times during this
base::AutoReset<bool> auto_reset_in_layout(&in_layout_, true);
@@ -892,7 +897,7 @@ void DockedWindowLayoutManager::OnWindowVisibilityChanging(
::wm::SetWindowVisibilityAnimationDuration(
window, base::TimeDelta::FromMilliseconds(kFadeDurationMs));
} else if (wm::GetWindowState(window)->IsMinimized()) {
- animation_type = WINDOW_VISIBILITY_ANIMATION_TYPE_MINIMIZE;
+ animation_type = wm::WINDOW_VISIBILITY_ANIMATION_TYPE_MINIMIZE;
}
::wm::SetWindowVisibilityAnimationType(window, animation_type);
}
« no previous file with comments | « ash/wm/default_state.cc ('k') | ash/wm/dock/docked_window_resizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698