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

Unified 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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/drag_window_resizer.h
diff --git a/ash/wm/drag_window_resizer.h b/ash/wm/drag_window_resizer.h
index 09e9ca66ac49927e155eff3c1321f041601068eb..c24f8f42fcd4d4fd8879001deb8c727b888ec3e6 100644
--- a/ash/wm/drag_window_resizer.h
+++ b/ash/wm/drag_window_resizer.h
@@ -8,6 +8,7 @@
#include "ash/wm/window_resizer.h"
#include "base/compiler_specific.h"
#include "base/gtest_prod_util.h"
+#include "base/memory/weak_ptr.h"
#include "ui/gfx/point.h"
namespace ash {
@@ -62,13 +63,11 @@ class ASH_EXPORT DragWindowResizer : public WindowResizer {
gfx::Point last_mouse_location_;
- // If non-NULL the destructor sets this to true. Used to determine if this has
- // been deleted.
- bool* destroyed_;
-
// Current instance for use by the DragWindowResizerTest.
static DragWindowResizer* instance_;
+ base::WeakPtrFactory<DragWindowResizer> weak_ptr_factory_;
+
DISALLOW_COPY_AND_ASSIGN(DragWindowResizer);
};
« 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