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

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

Issue 1127133003: Adjusts dragging logic to be less likely to trigger false positive switch from snapping to docking (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 | « no previous file | ash/wm/workspace/two_step_edge_cycler.cc » ('j') | ash/wm/workspace/two_step_edge_cycler.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/workspace/two_step_edge_cycler.h
diff --git a/ash/wm/workspace/two_step_edge_cycler.h b/ash/wm/workspace/two_step_edge_cycler.h
index 01ca0866220f7808eacd3e769c99bed948e842f9..a2e929d5e72769770e5728cc0d3af127a3d89cf0 100644
--- a/ash/wm/workspace/two_step_edge_cycler.h
+++ b/ash/wm/workspace/two_step_edge_cycler.h
@@ -6,6 +6,7 @@
#define ASH_WM_WORKSPACE_TWO_STEP_EDGE_CYCLER_H_
#include "ash/ash_export.h"
+#include "ash/wm/workspace/workspace_window_resizer.h"
#include "base/basictypes.h"
#include "base/time/time.h"
#include "ui/gfx/geometry/point.h"
@@ -19,7 +20,7 @@ namespace ash {
// the workspace.
class ASH_EXPORT TwoStepEdgeCycler {
public:
- explicit TwoStepEdgeCycler(const gfx::Point& start);
+ explicit TwoStepEdgeCycler(const gfx::Point& start, SnapType snap_type);
~TwoStepEdgeCycler();
// Update which mode should be used as a result of a mouse / touch move.
@@ -41,6 +42,15 @@ class ASH_EXPORT TwoStepEdgeCycler {
// Initial x-coordinate.
int start_x_;
+ // x-coordinate when paused.
+ int paused_x_;
+
+ // Whether the movement was paused.
+ bool paused_;
+
+ // Determines a movement direction that we are watching after a pause.
+ SnapType snap_type_;
pkotwicz 2015/05/07 17:10:28 Can we use a different enum? I find it kind of ugl
varkha 2015/05/07 20:27:28 Done.
+
DISALLOW_COPY_AND_ASSIGN(TwoStepEdgeCycler);
};
« no previous file with comments | « no previous file | ash/wm/workspace/two_step_edge_cycler.cc » ('j') | ash/wm/workspace/two_step_edge_cycler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698