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/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: Adjusts docking dragging logic to be more tolerant (optimization) 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..87ba62b8ad04c1b039bc575aeca97e068f601499 100644
--- a/ash/wm/workspace/two_step_edge_cycler.h
+++ b/ash/wm/workspace/two_step_edge_cycler.h
@@ -19,7 +19,10 @@ namespace ash {
// the workspace.
class ASH_EXPORT TwoStepEdgeCycler {
public:
- explicit TwoStepEdgeCycler(const gfx::Point& start);
+ // The direction in which a mouse should travel after a pause to switch mode.
pkotwicz 2015/05/11 21:35:21 Nit: Can you remove the "after a pause" part of th
varkha 2015/05/11 22:09:31 Done.
+ enum Direction { DIRECTION_LEFT, DIRECTION_RIGHT };
+
+ explicit TwoStepEdgeCycler(const gfx::Point& start, Direction direction);
~TwoStepEdgeCycler();
// Update which mode should be used as a result of a mouse / touch move.
@@ -41,6 +44,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.
pkotwicz 2015/05/11 21:35:20 Can you please update this comment?
varkha 2015/05/11 22:09:31 Done.
+ Direction direction_;
+
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