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" |
11 #include "ui/aura/client/window_move_client.h" | 11 #include "ui/aura/client/window_move_client.h" |
12 #include "ui/gfx/rect.h" | 12 #include "ui/gfx/rect.h" |
13 | 13 |
14 namespace aura { | 14 namespace aura { |
15 class Window; | 15 class Window; |
16 } | 16 } |
17 | 17 |
18 namespace ash { | 18 namespace ash { |
19 namespace wm { | |
20 class WindowState; | |
21 } | |
19 | 22 |
20 // WindowResizer is used by ToplevelWindowEventFilter to handle dragging, moving | 23 // WindowResizer is used by ToplevelWindowEventFilter to handle dragging, moving |
21 // or resizing a window. All coordinates passed to this are in the parent | 24 // or resizing a window. All coordinates passed to this are in the parent |
22 // windows coordinates. | 25 // windows coordinates. |
23 class ASH_EXPORT WindowResizer { | 26 class ASH_EXPORT WindowResizer { |
24 public: | 27 public: |
25 // Constants to identify the type of resize. | 28 // Constants to identify the type of resize. |
26 static const int kBoundsChange_None; | 29 static const int kBoundsChange_None; |
27 static const int kBoundsChange_Repositions; | 30 static const int kBoundsChange_Repositions; |
28 static const int kBoundsChange_Resizes; | 31 static const int kBoundsChange_Resizes; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
60 Details(); | 63 Details(); |
61 Details(aura::Window* window, | 64 Details(aura::Window* window, |
62 const gfx::Point& location, | 65 const gfx::Point& location, |
63 int window_component, | 66 int window_component, |
64 aura::client::WindowMoveSource source); | 67 aura::client::WindowMoveSource source); |
65 ~Details(); | 68 ~Details(); |
66 | 69 |
67 // The window we're resizing. | 70 // The window we're resizing. |
68 aura::Window* window; | 71 aura::Window* window; |
69 | 72 |
73 // The ash window state for the |window| above. | |
74 wm::WindowState* window_state; | |
James Cook
2013/09/18 20:44:17
Do we need to store this and |window| separately?
oshima
2013/09/19 01:52:01
I'll remove window in separate CL as CL is already
| |
75 | |
70 // Initial bounds of the window in parent coordinates. | 76 // Initial bounds of the window in parent coordinates. |
71 gfx::Rect initial_bounds_in_parent; | 77 gfx::Rect initial_bounds_in_parent; |
72 | 78 |
73 // Restore bounds (in screen coordinates) of the window before the drag | 79 // Restore bounds (in screen coordinates) of the window before the drag |
74 // started. Only set if the window is normal and is being dragged. | 80 // started. Only set if the window is normal and is being dragged. |
75 gfx::Rect restore_bounds; | 81 gfx::Rect restore_bounds; |
76 | 82 |
77 // Location passed to the constructor, in |window->parent()|'s coordinates. | 83 // Location passed to the constructor, in |window->parent()|'s coordinates. |
78 gfx::Point initial_location_in_parent; | 84 gfx::Point initial_location_in_parent; |
79 | 85 |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
140 // initialized with NULL if |window| should not be resized nor dragged. | 146 // initialized with NULL if |window| should not be resized nor dragged. |
141 ASH_EXPORT scoped_ptr<WindowResizer> CreateWindowResizer( | 147 ASH_EXPORT scoped_ptr<WindowResizer> CreateWindowResizer( |
142 aura::Window* window, | 148 aura::Window* window, |
143 const gfx::Point& point_in_parent, | 149 const gfx::Point& point_in_parent, |
144 int window_component, | 150 int window_component, |
145 aura::client::WindowMoveSource source); | 151 aura::client::WindowMoveSource source); |
146 | 152 |
147 } // namespace ash | 153 } // namespace ash |
148 | 154 |
149 #endif // ASH_WM_WINDOW_RESIZER_H_ | 155 #endif // ASH_WM_WINDOW_RESIZER_H_ |
OLD | NEW |