OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 #ifndef ASH_WM_DOCK_DOCK_WINDOW_RESIZER_H_ | 5 #ifndef ASH_WM_DOCK_DOCK_WINDOW_RESIZER_H_ |
6 #define ASH_WM_DOCK_DOCK_WINDOW_RESIZER_H_ | 6 #define ASH_WM_DOCK_DOCK_WINDOW_RESIZER_H_ |
7 | 7 |
8 #include "ash/wm/dock/dock_types.h" | 8 #include "ash/wm/dock/dock_types.h" |
9 #include "ash/wm/window_resizer.h" | 9 #include "ash/wm/window_resizer.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 | 51 |
52 // If the provided window bounds should snap to the side of a screen, | 52 // If the provided window bounds should snap to the side of a screen, |
53 // returns the offset that gives the necessary adjustment to snap. | 53 // returns the offset that gives the necessary adjustment to snap. |
54 void MaybeSnapToEdge(const gfx::Rect& bounds, gfx::Point* offset); | 54 void MaybeSnapToEdge(const gfx::Rect& bounds, gfx::Point* offset); |
55 | 55 |
56 // Tracks the window's initial position and attachment at the start of a drag | 56 // Tracks the window's initial position and attachment at the start of a drag |
57 // and informs the DockLayoutManager that a drag has started if necessary. | 57 // and informs the DockLayoutManager that a drag has started if necessary. |
58 void StartedDragging(); | 58 void StartedDragging(); |
59 | 59 |
60 // Informs the DockLayoutManager that the drag is complete if it was informed | 60 // Informs the DockLayoutManager that the drag is complete if it was informed |
61 // of the drag start. | 61 // of the drag start. |move_result| specifies if the drag was completed or |
62 void FinishedDragging(); | 62 // reverted. |
| 63 void FinishedDragging(aura::client::WindowMoveResult move_result); |
63 | 64 |
64 // Reparents dragged window as necessary to the docked container or back to | 65 // Reparents dragged window as necessary to the docked container or back to |
65 // workspace at the end of the drag. Calculates and returns action taken that | 66 // workspace at the end of the drag. Calculates and returns action taken that |
66 // can be reported in UMA stats. |is_resized| reports if the window is merely | 67 // can be reported in UMA stats. |is_resized| reports if the window is merely |
67 // being resized rather than repositioned. |attached_panel| is necessary to | 68 // being resized rather than repositioned. |attached_panel| is necessary to |
68 // avoid docking panels that have been attached to the launcher shelf at the | 69 // avoid docking panels that have been attached to the launcher shelf at the |
69 // end of the drag. | 70 // end of the drag. |
70 DockedAction MaybeReparentWindowOnDragCompletion(bool is_resized, | 71 DockedAction MaybeReparentWindowOnDragCompletion(bool is_resized, |
71 bool is_attached_panel); | 72 bool is_attached_panel); |
72 | 73 |
(...skipping 21 matching lines...) Expand all Loading... |
94 | 95 |
95 base::WeakPtrFactory<DockedWindowResizer> weak_ptr_factory_; | 96 base::WeakPtrFactory<DockedWindowResizer> weak_ptr_factory_; |
96 | 97 |
97 DISALLOW_COPY_AND_ASSIGN(DockedWindowResizer); | 98 DISALLOW_COPY_AND_ASSIGN(DockedWindowResizer); |
98 }; | 99 }; |
99 | 100 |
100 } // namespace internal | 101 } // namespace internal |
101 } // namespace ash | 102 } // namespace ash |
102 | 103 |
103 #endif // ASH_WM_DOCK_DOCK_WINDOW_RESIZER_H_ | 104 #endif // ASH_WM_DOCK_DOCK_WINDOW_RESIZER_H_ |
OLD | NEW |