Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(116)

Side by Side Diff: ash/wm/dock/docked_window_resizer.h

Issue 141053002: Avoids updating dock alignment when drag is cancelled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Avoids updating dock alignment when drag is cancelled (comments) Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/wm/dock/docked_window_layout_manager.cc ('k') | ash/wm/dock/docked_window_resizer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « ash/wm/dock/docked_window_layout_manager.cc ('k') | ash/wm/dock/docked_window_resizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698