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/common/wm/drag_details.h" | 5 #include "ash/common/wm/drag_details.h" |
6 | 6 |
7 #include "ash/common/wm/window_resizer.h" | 7 #include "ash/common/wm/window_resizer.h" |
8 #include "ash/common/wm_window.h" | 8 #include "ash/common/wm_window.h" |
9 #include "ash/public/cpp/window_properties.h" | 9 #include "ash/public/cpp/window_properties.h" |
10 #include "ui/aura/window.h" | 10 #include "ui/aura/window.h" |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 WindowResizer::GetPositionChangeDirectionForWindowComponent( | 62 WindowResizer::GetPositionChangeDirectionForWindowComponent( |
63 window_component)), | 63 window_component)), |
64 size_change_direction( | 64 size_change_direction( |
65 GetSizeChangeDirectionForWindowComponent(window_component)), | 65 GetSizeChangeDirectionForWindowComponent(window_component)), |
66 is_resizable(bounds_change != WindowResizer::kBoundsChangeDirection_None), | 66 is_resizable(bounds_change != WindowResizer::kBoundsChangeDirection_None), |
67 source(source), | 67 source(source), |
68 should_attach_to_shelf( | 68 should_attach_to_shelf( |
69 window->GetType() == ui::wm::WINDOW_TYPE_PANEL && | 69 window->GetType() == ui::wm::WINDOW_TYPE_PANEL && |
70 window->aura_window()->GetProperty(kPanelAttachedKey)) { | 70 window->aura_window()->GetProperty(kPanelAttachedKey)) { |
71 wm::WindowState* window_state = window->GetWindowState(); | 71 wm::WindowState* window_state = window->GetWindowState(); |
72 if ((window_state->IsNormalOrSnapped() || window_state->IsDocked()) && | 72 if (window_state->IsNormalOrSnapped() && window_state->HasRestoreBounds() && |
73 window_state->HasRestoreBounds() && window_component == HTCAPTION) { | 73 window_component == HTCAPTION) { |
74 restore_bounds = window_state->GetRestoreBoundsInScreen(); | 74 restore_bounds = window_state->GetRestoreBoundsInScreen(); |
75 } | 75 } |
76 } | 76 } |
77 | 77 |
78 DragDetails::~DragDetails() {} | 78 DragDetails::~DragDetails() {} |
79 | 79 |
80 } // namespace ash | 80 } // namespace ash |
OLD | NEW |