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

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 by pressing against the screen edge (rebase) 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/workspace/snap_sizer.cc ('k') | ash/wm/workspace/workspace_window_resizer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..d678e12b5fe8349a04f6fa2f813d3eb0529daa02 100644
--- a/ash/wm/workspace/workspace_window_resizer.h
+++ b/ash/wm/workspace/workspace_window_resizer.h
@@ -9,14 +9,17 @@
#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 {
namespace internal {
+class DockedWindowLayoutManager;
class PhantomWindowController;
class SnapSizer;
class WindowSize;
@@ -71,16 +74,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;
@@ -164,6 +157,10 @@ class ASH_EXPORT WorkspaceWindowResizer : public WindowResizer {
// snapping should be used.
SnapType GetSnapType(const gfx::Point& location) const;
+ // Dock when a window is at its last step in snapping sequence, undock
+ // otherwise.
+ void UpdateDockedState(bool is_docked);
+
aura::Window* window() const { return details_.window; }
const Details details_;
@@ -211,6 +208,13 @@ class ASH_EXPORT WorkspaceWindowResizer : public WindowResizer {
// should attach.
MatchedEdge magnetism_edge_;
+ // Dock container window layout manager.
+ DockedWindowLayoutManager* dock_layout_;
+
+ // 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);
};
« no previous file with comments | « ash/wm/workspace/snap_sizer.cc ('k') | ash/wm/workspace/workspace_window_resizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698