| 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/window_resizer.h" | 10 #include "ash/wm/window_resizer.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 static const int kScreenEdgeInset; | 42 static const int kScreenEdgeInset; |
| 43 | 43 |
| 44 virtual ~WorkspaceWindowResizer(); | 44 virtual ~WorkspaceWindowResizer(); |
| 45 | 45 |
| 46 static WorkspaceWindowResizer* Create( | 46 static WorkspaceWindowResizer* Create( |
| 47 aura::Window* window, | 47 aura::Window* window, |
| 48 const gfx::Point& location_in_parent, | 48 const gfx::Point& location_in_parent, |
| 49 int window_component, | 49 int window_component, |
| 50 const std::vector<aura::Window*>& attached_windows); | 50 const std::vector<aura::Window*>& attached_windows); |
| 51 | 51 |
| 52 // Overridden from WindowResizer: | 52 // WindowResizer: |
| 53 virtual void Drag(const gfx::Point& location_in_parent, | 53 virtual void Drag(const gfx::Point& location_in_parent, |
| 54 int event_flags) OVERRIDE; | 54 int event_flags) OVERRIDE; |
| 55 virtual void CompleteDrag(int event_flags) OVERRIDE; | 55 virtual void CompleteDrag(int event_flags) OVERRIDE; |
| 56 virtual void RevertDrag() OVERRIDE; | 56 virtual void RevertDrag() OVERRIDE; |
| 57 virtual aura::Window* GetTarget() OVERRIDE; | 57 virtual aura::Window* GetTarget() OVERRIDE; |
| 58 | 58 virtual const gfx::Point& GetInitialLocationForTest() const OVERRIDE; |
| 59 const gfx::Point& GetInitialLocationInParentForTest() const { | |
| 60 return details_.initial_location_in_parent; | |
| 61 } | |
| 62 | 59 |
| 63 private: | 60 private: |
| 64 WorkspaceWindowResizer(const Details& details, | 61 WorkspaceWindowResizer(const Details& details, |
| 65 const std::vector<aura::Window*>& attached_windows); | 62 const std::vector<aura::Window*>& attached_windows); |
| 66 | 63 |
| 67 private: | 64 private: |
| 68 FRIEND_TEST_ALL_PREFIXES(WorkspaceWindowResizerTest, CancelSnapPhantom); | 65 FRIEND_TEST_ALL_PREFIXES(WorkspaceWindowResizerTest, CancelSnapPhantom); |
| 69 FRIEND_TEST_ALL_PREFIXES(WorkspaceWindowResizerTest, PhantomSnapMaxSize); | 66 FRIEND_TEST_ALL_PREFIXES(WorkspaceWindowResizerTest, PhantomSnapMaxSize); |
| 70 | 67 |
| 71 // Type of snapping. | 68 // Type of snapping. |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 // should attach. | 205 // should attach. |
| 209 MatchedEdge magnetism_edge_; | 206 MatchedEdge magnetism_edge_; |
| 210 | 207 |
| 211 DISALLOW_COPY_AND_ASSIGN(WorkspaceWindowResizer); | 208 DISALLOW_COPY_AND_ASSIGN(WorkspaceWindowResizer); |
| 212 }; | 209 }; |
| 213 | 210 |
| 214 } // namespace internal | 211 } // namespace internal |
| 215 } // namespace ash | 212 } // namespace ash |
| 216 | 213 |
| 217 #endif // ASH_WM_WORKSPACE_WINDOW_RESIZER_H_ | 214 #endif // ASH_WM_WORKSPACE_WINDOW_RESIZER_H_ |
| OLD | NEW |