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_PANELS_PANEL_WINDOW_RESIZER_H_ | 5 #ifndef ASH_WM_PANELS_PANEL_WINDOW_RESIZER_H_ |
6 #define ASH_WM_PANELS_PANEL_WINDOW_RESIZER_H_ | 6 #define ASH_WM_PANELS_PANEL_WINDOW_RESIZER_H_ |
7 | 7 |
8 #include "ash/wm/window_resizer.h" | 8 #include "ash/wm/window_resizer.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/weak_ptr.h" |
10 | 11 |
11 namespace gfx { | 12 namespace gfx { |
12 class Rect; | 13 class Rect; |
13 class Point; | 14 class Point; |
14 } | 15 } |
15 | 16 |
16 namespace ash { | 17 namespace ash { |
17 | 18 |
18 // PanelWindowResizer is used by ToplevelWindowEventFilter to handle dragging, | 19 // PanelWindowResizer is used by ToplevelWindowEventFilter to handle dragging, |
19 // moving or resizing panel window. These can be attached and detached from the | 20 // moving or resizing panel window. These can be attached and detached from the |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 | 77 |
77 // Set to true once Drag() is invoked and the bounds of the window change. | 78 // Set to true once Drag() is invoked and the bounds of the window change. |
78 bool did_move_or_resize_; | 79 bool did_move_or_resize_; |
79 | 80 |
80 // True if the window started attached to the launcher. | 81 // True if the window started attached to the launcher. |
81 const bool was_attached_; | 82 const bool was_attached_; |
82 | 83 |
83 // True if the window should attach to the launcher after releasing. | 84 // True if the window should attach to the launcher after releasing. |
84 bool should_attach_; | 85 bool should_attach_; |
85 | 86 |
86 // If non-NULL the destructor sets this to true. Used to determine if this has | 87 base::WeakPtrFactory<PanelWindowResizer> weak_ptr_factory_; |
87 // been deleted. | |
88 bool* destroyed_; | |
89 | 88 |
90 DISALLOW_COPY_AND_ASSIGN(PanelWindowResizer); | 89 DISALLOW_COPY_AND_ASSIGN(PanelWindowResizer); |
91 }; | 90 }; |
92 | 91 |
93 } // namespace ash | 92 } // namespace ash |
94 | 93 |
95 #endif // ASH_WM_PANELS_PANEL_WINDOW_RESIZER_H_ | 94 #endif // ASH_WM_PANELS_PANEL_WINDOW_RESIZER_H_ |
OLD | NEW |