Chromium Code Reviews| 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_WINDOW_RESIZER_H_ | 5 #ifndef ASH_WM_WINDOW_RESIZER_H_ |
| 6 #define ASH_WM_WINDOW_RESIZER_H_ | 6 #define ASH_WM_WINDOW_RESIZER_H_ |
| 7 | 7 |
| 8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 44 | 44 |
| 45 // Invoked to complete the drag. | 45 // Invoked to complete the drag. |
| 46 virtual void CompleteDrag(int event_flags) = 0; | 46 virtual void CompleteDrag(int event_flags) = 0; |
| 47 | 47 |
| 48 // Reverts the drag. | 48 // Reverts the drag. |
| 49 virtual void RevertDrag() = 0; | 49 virtual void RevertDrag() = 0; |
| 50 | 50 |
| 51 // Returns the target window the resizer was created for. | 51 // Returns the target window the resizer was created for. |
| 52 virtual aura::Window* GetTarget() = 0; | 52 virtual aura::Window* GetTarget() = 0; |
| 53 | 53 |
| 54 // See comment for |Details::initial_location_in_parent|. | |
| 55 virtual const gfx::Point& GetInitialLocationForTest() const = 0; | |
|
flackr
2013/06/14 18:31:50
This should be protected since it's only for tests
varkha
2013/06/14 22:13:09
Done.
| |
| 56 | |
| 54 protected: | 57 protected: |
| 55 struct Details { | 58 struct Details { |
| 56 Details(); | 59 Details(); |
| 57 Details(aura::Window* window, | 60 Details(aura::Window* window, |
| 58 const gfx::Point& location, | 61 const gfx::Point& location, |
| 59 int window_component); | 62 int window_component); |
| 60 ~Details(); | 63 ~Details(); |
| 61 | 64 |
| 62 // The window we're resizing. | 65 // The window we're resizing. |
| 63 aura::Window* window; | 66 aura::Window* window; |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 122 int* delta_y); | 125 int* delta_y); |
| 123 }; | 126 }; |
| 124 | 127 |
| 125 // Creates a WindowResizer for |window|. This can return a scoped_ptr | 128 // Creates a WindowResizer for |window|. This can return a scoped_ptr |
| 126 // initialized with NULL if |window| should not be resized nor dragged. | 129 // initialized with NULL if |window| should not be resized nor dragged. |
| 127 ASH_EXPORT scoped_ptr<WindowResizer> CreateWindowResizer( | 130 ASH_EXPORT scoped_ptr<WindowResizer> CreateWindowResizer( |
| 128 aura::Window* window, | 131 aura::Window* window, |
| 129 const gfx::Point& point_in_parent, | 132 const gfx::Point& point_in_parent, |
| 130 int window_component); | 133 int window_component); |
| 131 | 134 |
| 132 } // namespace aura | 135 namespace internal { |
| 136 class DragWindowResizer; | |
| 137 | |
| 138 // Creates a WindowResizer for |window|. | |
| 139 // This internal creator exposes DragWindowResizer for use by tests. | |
| 140 ASH_EXPORT scoped_ptr<WindowResizer> CreateWindowResizerExposeDragResizer( | |
| 141 aura::Window* window, | |
| 142 const gfx::Point& point_in_parent, | |
| 143 int window_component, | |
| 144 DragWindowResizer** drag_resizer); | |
| 145 } // namespace internal | |
| 146 | |
| 147 } // namespace ash | |
| 133 | 148 |
| 134 #endif // ASH_WM_WINDOW_RESIZER_H_ | 149 #endif // ASH_WM_WINDOW_RESIZER_H_ |
| OLD | NEW |