| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef ASH_COMMON_WM_DRAG_DETAILS_H_ | |
| 6 #define ASH_COMMON_WM_DRAG_DETAILS_H_ | |
| 7 | |
| 8 #include "ash/ash_export.h" | |
| 9 #include "ash/common/wm/wm_types.h" | |
| 10 #include "ui/gfx/geometry/rect.h" | |
| 11 #include "ui/wm/public/window_move_client.h" | |
| 12 | |
| 13 namespace ash { | |
| 14 | |
| 15 class WmWindow; | |
| 16 | |
| 17 struct ASH_EXPORT DragDetails { | |
| 18 DragDetails(WmWindow* window, | |
| 19 const gfx::Point& location, | |
| 20 int window_component, | |
| 21 // TODO(sky): make wm type. | |
| 22 aura::client::WindowMoveSource source); | |
| 23 ~DragDetails(); | |
| 24 | |
| 25 ash::wm::WindowStateType initial_state_type; | |
| 26 | |
| 27 // Initial bounds of the window in parent coordinates. | |
| 28 const gfx::Rect initial_bounds_in_parent; | |
| 29 | |
| 30 // Restore bounds (in screen coordinates) of the window before the drag | |
| 31 // started. Only set if the window is normal and is being dragged. | |
| 32 gfx::Rect restore_bounds; | |
| 33 | |
| 34 // Location passed to the constructor, in |window->parent()|'s coordinates. | |
| 35 const gfx::Point initial_location_in_parent; | |
| 36 | |
| 37 // Initial opacity of the window. | |
| 38 const float initial_opacity; | |
| 39 | |
| 40 // The component the user pressed on. | |
| 41 const int window_component; | |
| 42 | |
| 43 // Bitmask of the |kBoundsChange_| constants. | |
| 44 const int bounds_change; | |
| 45 | |
| 46 // Bitmask of the |kBoundsChangeDirection_| constants. | |
| 47 const int position_change_direction; | |
| 48 | |
| 49 // Bitmask of the |kBoundsChangeDirection_| constants. | |
| 50 const int size_change_direction; | |
| 51 | |
| 52 // Will the drag actually modify the window? | |
| 53 const bool is_resizable; | |
| 54 | |
| 55 // Source of the event initiating the drag. | |
| 56 const aura::client::WindowMoveSource source; | |
| 57 | |
| 58 // True if the window should attach to the shelf after releasing. | |
| 59 bool should_attach_to_shelf; | |
| 60 }; | |
| 61 | |
| 62 } // namespace ash | |
| 63 | |
| 64 #endif // ASH_COMMON_WM_DRAG_DETAILS_H_ | |
| OLD | NEW |