Index: ash/wm/dock/docked_window_resizer.cc |
diff --git a/ash/wm/dock/docked_window_resizer.cc b/ash/wm/dock/docked_window_resizer.cc |
index e16895598dcc8d2de44ee621c3b2e01d17a6ed65..2882f3b2193631633b002b59a661a0981a797761 100644 |
--- a/ash/wm/dock/docked_window_resizer.cc |
+++ b/ash/wm/dock/docked_window_resizer.cc |
@@ -15,8 +15,7 @@ |
#include "ash/shell_window_ids.h" |
#include "ash/wm/coordinate_conversion.h" |
#include "ash/wm/dock/docked_window_layout_manager.h" |
-#include "ash/wm/property_util.h" |
-#include "ash/wm/window_settings.h" |
+#include "ash/wm/window_state.h" |
#include "ash/wm/workspace/magnetism_matcher.h" |
#include "ash/wm/workspace/workspace_window_resizer.h" |
#include "base/command_line.h" |
@@ -80,10 +79,10 @@ void DockedWindowResizer::Drag(const gfx::Point& location, int event_flags) { |
// Temporarily clear kWindowTrackedByWorkspaceKey for windows that are snapped |
// to screen edges e.g. when they are docked. This prevents the windows from |
// getting snapped to other nearby windows during the drag. |
- wm::WindowSettings* window_settings = wm::GetWindowSettings(GetTarget()); |
- bool was_tracked_by_workspace = window_settings->tracked_by_workspace(); |
+ wm::WindowState* window_state = wm::GetWindowState(GetTarget()); |
+ bool was_tracked_by_workspace = window_state->tracked_by_workspace(); |
if (set_tracked_by_workspace) |
- window_settings->SetTrackedByWorkspace(false); |
+ window_state->SetTrackedByWorkspace(false); |
gfx::Point modified_location(location.x() + offset.x(), |
location.y() + offset.y()); |
@@ -91,7 +90,7 @@ void DockedWindowResizer::Drag(const gfx::Point& location, int event_flags) { |
next_window_resizer_->Drag(modified_location, event_flags); |
if (!resizer) |
return; |
- window_settings->SetTrackedByWorkspace(was_tracked_by_workspace); |
+ window_state->SetTrackedByWorkspace(was_tracked_by_workspace); |
DockedWindowLayoutManager* new_dock_layout = |
GetDockedLayoutManagerAtPoint(last_location_); |
@@ -121,24 +120,24 @@ void DockedWindowResizer::CompleteDrag(int event_flags) { |
// Temporarily clear kWindowTrackedByWorkspaceKey for panels so that they |
// don't get forced into the workspace that may be shrunken because of docked |
// windows. |
- wm::WindowSettings* window_settings = wm::GetWindowSettings(GetTarget()); |
- bool was_tracked_by_workspace = window_settings->tracked_by_workspace(); |
+ wm::WindowState* window_state = wm::GetWindowState(GetTarget()); |
+ bool was_tracked_by_workspace = window_state->tracked_by_workspace(); |
if (was_docked_) |
- window_settings->SetTrackedByWorkspace(false); |
+ window_state->SetTrackedByWorkspace(false); |
// The root window can change when dragging into a different screen. |
next_window_resizer_->CompleteDrag(event_flags); |
FinishedDragging(); |
- window_settings->SetTrackedByWorkspace(was_tracked_by_workspace); |
+ window_state->SetTrackedByWorkspace(was_tracked_by_workspace); |
} |
void DockedWindowResizer::RevertDrag() { |
// Temporarily clear kWindowTrackedByWorkspaceKey for panels so that they |
// don't get forced into the workspace that may be shrunken because of docked |
// windows. |
- wm::WindowSettings* window_settings = wm::GetWindowSettings(GetTarget()); |
- bool was_tracked_by_workspace = window_settings->tracked_by_workspace(); |
+ wm::WindowState* window_state = wm::GetWindowState(GetTarget()); |
+ bool was_tracked_by_workspace = window_state->tracked_by_workspace(); |
if (was_docked_) |
- window_settings->SetTrackedByWorkspace(false); |
+ window_state->SetTrackedByWorkspace(false); |
next_window_resizer_->RevertDrag(); |
// Restore docked state to what it was before the drag if necessary. |
if (was_docked_ && !is_docked_) { |
@@ -146,7 +145,7 @@ void DockedWindowResizer::RevertDrag() { |
is_docked_ = was_docked_; |
} |
FinishedDragging(); |
- window_settings->SetTrackedByWorkspace(was_tracked_by_workspace); |
+ window_state->SetTrackedByWorkspace(was_tracked_by_workspace); |
} |
aura::Window* DockedWindowResizer::GetTarget() { |
@@ -227,7 +226,7 @@ void DockedWindowResizer::StartedDragging() { |
if (GetTarget()->type() != aura::client::WINDOW_TYPE_PANEL && |
GetTarget()->parent()->id() == kShellWindowId_DefaultContainer) { |
// The window is going to be reparented - avoid completing the drag. |
- wm::GetWindowSettings(GetTarget())->set_continue_drag_after_reparent(true); |
+ wm::GetWindowState(GetTarget())->set_continue_drag_after_reparent(true); |
// Reparent the window into the docked windows container in order to get it |
// on top of other docked windows. |
@@ -243,16 +242,16 @@ void DockedWindowResizer::StartedDragging() { |
void DockedWindowResizer::FinishedDragging() { |
if (!did_move_or_resize_) |
return; |
- |
aura::Window* window = GetTarget(); |
+ wm::WindowState* window_state = wm::GetWindowState(window); |
const bool attached_panel = |
window->type() == aura::client::WINDOW_TYPE_PANEL && |
- wm::GetWindowSettings(window)->panel_attached(); |
+ window_state->panel_attached(); |
const bool is_resized = |
(details_.bounds_change & WindowResizer::kBoundsChange_Resizes) != 0; |
// No longer restore to pre-docked bounds if a window has been resized. |
if (is_resized && is_docked_) |
- ClearRestoreBounds(window); |
+ window_state->ClearRestoreBounds(); |
// Check if the window needs to be docked or returned to workspace. |
aura::Window* dock_container = Shell::GetContainer( |