OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_WORKSPACE_WORKSPACE_WINDOW_RESIZER_H_ | 5 #ifndef ASH_WM_WORKSPACE_WORKSPACE_WINDOW_RESIZER_H_ |
6 #define ASH_WM_WORKSPACE_WORKSPACE_WINDOW_RESIZER_H_ | 6 #define ASH_WM_WORKSPACE_WORKSPACE_WINDOW_RESIZER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
| 10 #include <memory> |
10 #include <vector> | 11 #include <vector> |
11 | 12 |
12 #include "ash/wm/window_resizer.h" | 13 #include "ash/wm/window_resizer.h" |
13 #include "ash/wm/workspace/magnetism_matcher.h" | 14 #include "ash/wm/workspace/magnetism_matcher.h" |
14 #include "base/compiler_specific.h" | 15 #include "base/compiler_specific.h" |
15 #include "base/macros.h" | 16 #include "base/macros.h" |
16 #include "base/memory/scoped_ptr.h" | |
17 #include "base/memory/weak_ptr.h" | 17 #include "base/memory/weak_ptr.h" |
18 #include "ui/aura/window_tracker.h" | 18 #include "ui/aura/window_tracker.h" |
19 | 19 |
20 namespace ash { | 20 namespace ash { |
21 class DockedWindowLayoutManager; | 21 class DockedWindowLayoutManager; |
22 class PhantomWindowController; | 22 class PhantomWindowController; |
23 class TwoStepEdgeCycler; | 23 class TwoStepEdgeCycler; |
24 class WindowSize; | 24 class WindowSize; |
25 | 25 |
26 namespace wm { | 26 namespace wm { |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 std::vector<int> initial_size_; | 179 std::vector<int> initial_size_; |
180 | 180 |
181 // Sum of the minimum sizes of the attached windows. | 181 // Sum of the minimum sizes of the attached windows. |
182 int total_min_; | 182 int total_min_; |
183 | 183 |
184 // Sum of the sizes in |initial_size_|. | 184 // Sum of the sizes in |initial_size_|. |
185 int total_initial_size_; | 185 int total_initial_size_; |
186 | 186 |
187 // Gives a previews of where the the window will end up. Only used if there | 187 // Gives a previews of where the the window will end up. Only used if there |
188 // is a grid and the caption is being dragged. | 188 // is a grid and the caption is being dragged. |
189 scoped_ptr<PhantomWindowController> snap_phantom_window_controller_; | 189 std::unique_ptr<PhantomWindowController> snap_phantom_window_controller_; |
190 | 190 |
191 // Used to determine whether the window should be snapped or docked when | 191 // Used to determine whether the window should be snapped or docked when |
192 // the user drags a window to the edge of the screen. | 192 // the user drags a window to the edge of the screen. |
193 scoped_ptr<TwoStepEdgeCycler> edge_cycler_; | 193 std::unique_ptr<TwoStepEdgeCycler> edge_cycler_; |
194 | 194 |
195 // The edge to which the window should be snapped to at the end of the drag. | 195 // The edge to which the window should be snapped to at the end of the drag. |
196 SnapType snap_type_; | 196 SnapType snap_type_; |
197 | 197 |
198 // Number of mouse moves since the last bounds change. Only used for phantom | 198 // Number of mouse moves since the last bounds change. Only used for phantom |
199 // placement to track when the mouse is moved while pushed against the edge of | 199 // placement to track when the mouse is moved while pushed against the edge of |
200 // the screen. | 200 // the screen. |
201 int num_mouse_moves_since_bounds_change_; | 201 int num_mouse_moves_since_bounds_change_; |
202 | 202 |
203 // The mouse location passed to Drag(). | 203 // The mouse location passed to Drag(). |
(...skipping 15 matching lines...) Expand all Loading... |
219 // Used to determine if this has been deleted during a drag such as when a tab | 219 // Used to determine if this has been deleted during a drag such as when a tab |
220 // gets dragged into another browser window. | 220 // gets dragged into another browser window. |
221 base::WeakPtrFactory<WorkspaceWindowResizer> weak_ptr_factory_; | 221 base::WeakPtrFactory<WorkspaceWindowResizer> weak_ptr_factory_; |
222 | 222 |
223 DISALLOW_COPY_AND_ASSIGN(WorkspaceWindowResizer); | 223 DISALLOW_COPY_AND_ASSIGN(WorkspaceWindowResizer); |
224 }; | 224 }; |
225 | 225 |
226 } // namespace ash | 226 } // namespace ash |
227 | 227 |
228 #endif // ASH_WM_WORKSPACE_WORKSPACE_WINDOW_RESIZER_H_ | 228 #endif // ASH_WM_WORKSPACE_WORKSPACE_WINDOW_RESIZER_H_ |
OLD | NEW |