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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
55 struct Details { | 55 struct Details { |
56 Details(); | 56 Details(); |
57 Details(aura::Window* window, | 57 Details(aura::Window* window, |
58 const gfx::Point& location, | 58 const gfx::Point& location, |
59 int window_component); | 59 int window_component); |
60 ~Details(); | 60 ~Details(); |
61 | 61 |
62 // The window we're resizing. | 62 // The window we're resizing. |
63 aura::Window* window; | 63 aura::Window* window; |
64 | 64 |
65 // Initial bounds of the window. | 65 // Initial bounds of the window in parent coordinates. |
66 gfx::Rect initial_bounds_in_parent; | |
67 | |
68 // Initial bounds of the window in screen coordinates. | |
66 gfx::Rect initial_bounds; | 69 gfx::Rect initial_bounds; |
sky
2012/11/01 16:34:35
How come we need to track both bounds in parent an
oshima
2012/11/01 18:11:35
I originally thought it's more readable, but it wa
| |
67 | 70 |
68 // Restore bounds (in screen coordinates) of the window before the drag | 71 // Restore bounds (in screen coordinates) of the window before the drag |
69 // started. Only set if the window is normal and is being dragged. | 72 // started. Only set if the window is normal and is being dragged. |
70 gfx::Rect restore_bounds; | 73 gfx::Rect restore_bounds; |
71 | 74 |
72 // Location passed to the constructor, in |window->parent()|'s coordinates. | 75 // Location passed to the constructor, in |window->parent()|'s coordinates. |
73 gfx::Point initial_location_in_parent; | 76 gfx::Point initial_location_in_parent; |
74 | 77 |
75 // Initial opacity of the window. | 78 // Initial opacity of the window. |
76 float initial_opacity; | 79 float initial_opacity; |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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 scoped_ptr<WindowResizer> CreateWindowResizer( | 130 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 aura |
133 | 136 |
134 #endif // ASH_WM_WINDOW_RESIZER_H_ | 137 #endif // ASH_WM_WINDOW_RESIZER_H_ |
OLD | NEW |