| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ash/wm/drag_details.h" | 5 #include "ash/wm/drag_details.h" |
| 6 | 6 |
| 7 #include "ash/wm/window_resizer.h" | 7 #include "ash/wm/window_resizer.h" |
| 8 #include "ui/aura/window.h" | 8 #include "ui/aura/window.h" |
| 9 #include "ui/base/hit_test.h" | 9 #include "ui/base/hit_test.h" |
| 10 | 10 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 position_change_direction( | 55 position_change_direction( |
| 56 WindowResizer::GetPositionChangeDirectionForWindowComponent( | 56 WindowResizer::GetPositionChangeDirectionForWindowComponent( |
| 57 window_component)), | 57 window_component)), |
| 58 size_change_direction( | 58 size_change_direction( |
| 59 GetSizeChangeDirectionForWindowComponent(window_component)), | 59 GetSizeChangeDirectionForWindowComponent(window_component)), |
| 60 is_resizable(bounds_change != WindowResizer::kBoundsChangeDirection_None), | 60 is_resizable(bounds_change != WindowResizer::kBoundsChangeDirection_None), |
| 61 source(source), | 61 source(source), |
| 62 should_attach_to_shelf(window->type() == ui::wm::WINDOW_TYPE_PANEL && | 62 should_attach_to_shelf(window->type() == ui::wm::WINDOW_TYPE_PANEL && |
| 63 wm::GetWindowState(window)->panel_attached()) { | 63 wm::GetWindowState(window)->panel_attached()) { |
| 64 wm::WindowState* window_state = wm::GetWindowState(window); | 64 wm::WindowState* window_state = wm::GetWindowState(window); |
| 65 if (window_state->IsNormalOrSnapped() && | 65 if ((window_state->IsNormalOrSnapped() || window_state->IsDocked()) && |
| 66 window_state->HasRestoreBounds() && | 66 window_state->HasRestoreBounds() && |
| 67 window_component == HTCAPTION) { | 67 window_component == HTCAPTION) { |
| 68 restore_bounds = window_state->GetRestoreBoundsInScreen(); | 68 restore_bounds = window_state->GetRestoreBoundsInScreen(); |
| 69 } | 69 } |
| 70 } | 70 } |
| 71 | 71 |
| 72 DragDetails::~DragDetails() { | 72 DragDetails::~DragDetails() { |
| 73 } | 73 } |
| 74 | 74 |
| 75 } // namespace ash | 75 } // namespace ash |
| OLD | NEW |