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

Unified Diff: ash/wm/workspace/workspace_window_resizer.h

Issue 23431009: Windows docking should get triggered by pressing against the screen edge (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Windows docking should get triggered by pressing against the screen edge (warn) 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
Index: ash/wm/workspace/workspace_window_resizer.h
diff --git a/ash/wm/workspace/workspace_window_resizer.h b/ash/wm/workspace/workspace_window_resizer.h
index 76176b1a2b4a77fa7b1ad3b4a75eafded2a7e282..1759e4e81443ad2c5d3932e03c6288bb47827483 100644
--- a/ash/wm/workspace/workspace_window_resizer.h
+++ b/ash/wm/workspace/workspace_window_resizer.h
@@ -9,9 +9,11 @@
#include "ash/wm/window_resizer.h"
#include "ash/wm/workspace/magnetism_matcher.h"
+#include "ash/wm/workspace/snap_types.h"
#include "base/compiler_specific.h"
#include "base/gtest_prod_util.h"
#include "base/memory/scoped_ptr.h"
+#include "base/memory/weak_ptr.h"
#include "ui/aura/window_tracker.h"
namespace ash {
@@ -71,16 +73,6 @@ class ASH_EXPORT WorkspaceWindowResizer : public WindowResizer {
FRIEND_TEST_ALL_PREFIXES(WorkspaceWindowResizerTest, PhantomSnapMaxSize);
FRIEND_TEST_ALL_PREFIXES(WorkspaceWindowResizerTest, PhantomWindowShow);
- // Type of snapping.
- enum SnapType {
- // Snap to the left/right edge of the screen.
- SNAP_LEFT_EDGE,
- SNAP_RIGHT_EDGE,
-
- // No snap position.
- SNAP_NONE
- };
-
// Returns the final bounds to place the window at. This differs from
// the current when snapping.
gfx::Rect GetFinalBounds(const gfx::Rect& bounds) const;
@@ -211,6 +203,10 @@ class ASH_EXPORT WorkspaceWindowResizer : public WindowResizer {
// should attach.
MatchedEdge magnetism_edge_;
+ // Used to determine if this has been deleted during a drag such as when a tab
+ // gets dragged into another browser window.
+ base::WeakPtrFactory<WorkspaceWindowResizer> weak_ptr_factory_;
+
DISALLOW_COPY_AND_ASSIGN(WorkspaceWindowResizer);
};

Powered by Google App Engine
This is Rietveld 408576698