| 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_WINDOW_RESIZER_H_ | 5 #ifndef ASH_WM_WORKSPACE_WINDOW_RESIZER_H_ |
| 6 #define ASH_WM_WORKSPACE_WINDOW_RESIZER_H_ | 6 #define ASH_WM_WORKSPACE_WINDOW_RESIZER_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "ash/wm/property_util.h" |
| 10 #include "ash/wm/window_resizer.h" | 11 #include "ash/wm/window_resizer.h" |
| 11 #include "ash/wm/workspace/magnetism_matcher.h" | 12 #include "ash/wm/workspace/magnetism_matcher.h" |
| 12 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
| 13 #include "base/gtest_prod_util.h" | 14 #include "base/gtest_prod_util.h" |
| 14 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
| 15 #include "ui/aura/window_tracker.h" | 16 #include "ui/aura/window_tracker.h" |
| 16 | 17 |
| 17 namespace ash { | 18 namespace ash { |
| 18 namespace internal { | 19 namespace internal { |
| 19 | 20 |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 // Gives a previews of where the the window will end up. Only used if there | 184 // Gives a previews of where the the window will end up. Only used if there |
| 184 // is a grid and the caption is being dragged. | 185 // is a grid and the caption is being dragged. |
| 185 scoped_ptr<PhantomWindowController> snap_phantom_window_controller_; | 186 scoped_ptr<PhantomWindowController> snap_phantom_window_controller_; |
| 186 | 187 |
| 187 // Used to determine the target position of a snap. | 188 // Used to determine the target position of a snap. |
| 188 scoped_ptr<SnapSizer> snap_sizer_; | 189 scoped_ptr<SnapSizer> snap_sizer_; |
| 189 | 190 |
| 190 // Last SnapType. | 191 // Last SnapType. |
| 191 SnapType snap_type_; | 192 SnapType snap_type_; |
| 192 | 193 |
| 194 // Last updated touched edge. We track it until |this| instance gets destroyed |
| 195 // at which point a property gets updated and observers get called to add the |
| 196 // window to the dock if necessary. |
| 197 ash::DockEdge dock_edge_; |
| 198 |
| 193 // Number of mouse moves since the last bounds change. Only used for phantom | 199 // Number of mouse moves since the last bounds change. Only used for phantom |
| 194 // placement to track when the mouse is moved while pushed against the edge of | 200 // placement to track when the mouse is moved while pushed against the edge of |
| 195 // the screen. | 201 // the screen. |
| 196 int num_mouse_moves_since_bounds_change_; | 202 int num_mouse_moves_since_bounds_change_; |
| 197 | 203 |
| 198 // The mouse location passed to Drag(). | 204 // The mouse location passed to Drag(). |
| 199 gfx::Point last_mouse_location_; | 205 gfx::Point last_mouse_location_; |
| 200 | 206 |
| 201 // Window the drag has magnetically attached to. | 207 // Window the drag has magnetically attached to. |
| 202 aura::Window* magnetism_window_; | 208 aura::Window* magnetism_window_; |
| 203 | 209 |
| 204 // Used to verify |magnetism_window_| is still valid. | 210 // Used to verify |magnetism_window_| is still valid. |
| 205 aura::WindowTracker window_tracker_; | 211 aura::WindowTracker window_tracker_; |
| 206 | 212 |
| 207 // If |magnetism_window_| is non-NULL this indicates how the two windows | 213 // If |magnetism_window_| is non-NULL this indicates how the two windows |
| 208 // should attach. | 214 // should attach. |
| 209 MatchedEdge magnetism_edge_; | 215 MatchedEdge magnetism_edge_; |
| 210 | 216 |
| 211 DISALLOW_COPY_AND_ASSIGN(WorkspaceWindowResizer); | 217 DISALLOW_COPY_AND_ASSIGN(WorkspaceWindowResizer); |
| 212 }; | 218 }; |
| 213 | 219 |
| 214 } // namespace internal | 220 } // namespace internal |
| 215 } // namespace ash | 221 } // namespace ash |
| 216 | 222 |
| 217 #endif // ASH_WM_WORKSPACE_WINDOW_RESIZER_H_ | 223 #endif // ASH_WM_WORKSPACE_WINDOW_RESIZER_H_ |
| OLD | NEW |