Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(47)

Side by Side Diff: ash/wm/panels/panel_window_resizer.h

Issue 23645008: Use a weak pointer to determine if resizer was destroyed by nested Drag calls. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/wm/drag_window_resizer.cc ('k') | ash/wm/panels/panel_window_resizer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « ash/wm/drag_window_resizer.cc ('k') | ash/wm/panels/panel_window_resizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698