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

Side by Side Diff: ash/wm/drag_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/dock/docked_window_resizer.cc ('k') | ash/wm/drag_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_DRAG_WINDOW_RESIZER_H_ 5 #ifndef ASH_WM_DRAG_WINDOW_RESIZER_H_
6 #define ASH_WM_DRAG_WINDOW_RESIZER_H_ 6 #define ASH_WM_DRAG_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/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
11 #include "base/memory/weak_ptr.h"
11 #include "ui/gfx/point.h" 12 #include "ui/gfx/point.h"
12 13
13 namespace ash { 14 namespace ash {
14 namespace internal { 15 namespace internal {
15 16
16 class DragWindowController; 17 class DragWindowController;
17 18
18 // DragWindowResizer is a decorator of WindowResizer and adds the ability to 19 // DragWindowResizer is a decorator of WindowResizer and adds the ability to
19 // drag windows across displays. 20 // drag windows across displays.
20 class ASH_EXPORT DragWindowResizer : public WindowResizer { 21 class ASH_EXPORT DragWindowResizer : public WindowResizer {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 56
56 scoped_ptr<WindowResizer> next_window_resizer_; 57 scoped_ptr<WindowResizer> next_window_resizer_;
57 58
58 // Shows a semi-transparent image of the window being dragged. 59 // Shows a semi-transparent image of the window being dragged.
59 scoped_ptr<DragWindowController> drag_window_controller_; 60 scoped_ptr<DragWindowController> drag_window_controller_;
60 61
61 const Details details_; 62 const Details details_;
62 63
63 gfx::Point last_mouse_location_; 64 gfx::Point last_mouse_location_;
64 65
65 // If non-NULL the destructor sets this to true. Used to determine if this has
66 // been deleted.
67 bool* destroyed_;
68
69 // Current instance for use by the DragWindowResizerTest. 66 // Current instance for use by the DragWindowResizerTest.
70 static DragWindowResizer* instance_; 67 static DragWindowResizer* instance_;
71 68
69 base::WeakPtrFactory<DragWindowResizer> weak_ptr_factory_;
70
72 DISALLOW_COPY_AND_ASSIGN(DragWindowResizer); 71 DISALLOW_COPY_AND_ASSIGN(DragWindowResizer);
73 }; 72 };
74 73
75 } // namespace internal 74 } // namespace internal
76 } // namespace aura 75 } // namespace aura
77 76
78 #endif // ASH_WM_DRAG_WINDOW_RESIZER_H_ 77 #endif // ASH_WM_DRAG_WINDOW_RESIZER_H_
OLDNEW
« no previous file with comments | « ash/wm/dock/docked_window_resizer.cc ('k') | ash/wm/drag_window_resizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698