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

Unified Diff: ash/wm/gestures/overview_gesture_handler.h

Issue 2667293002: [ash-md] Adds support for gesture to move selection in overview mode (Closed)
Patch Set: [ash-md] Adds support for gesture to move selection in overview mode (no skipping 1st) Created 3 years, 10 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/common/wm/overview/window_selector_controller.cc ('k') | ash/wm/gestures/overview_gesture_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/gestures/overview_gesture_handler.h
diff --git a/ash/wm/gestures/overview_gesture_handler.h b/ash/wm/gestures/overview_gesture_handler.h
index af1ba739ebc2a45379b672ae166cefed286ba54d..2f19cea32ba7fdcab66c897abdc2d15dff07e3a6 100644
--- a/ash/wm/gestures/overview_gesture_handler.h
+++ b/ash/wm/gestures/overview_gesture_handler.h
@@ -5,6 +5,7 @@
#ifndef ASH_WM_GESTURES_OVERVIEW_GESTURE_HANDLER_H_
#define ASH_WM_GESTURES_OVERVIEW_GESTURE_HANDLER_H_
+#include "ash/ash_export.h"
#include "base/macros.h"
namespace ui {
@@ -14,7 +15,7 @@ class ScrollEvent;
namespace ash {
// This handles 3-finger touchpad scroll events to enter/exit overview mode.
-class OverviewGestureHandler {
+class ASH_EXPORT OverviewGestureHandler {
public:
OverviewGestureHandler();
virtual ~OverviewGestureHandler();
@@ -24,10 +25,21 @@ class OverviewGestureHandler {
bool ProcessScrollEvent(const ui::ScrollEvent& event);
private:
- // The total distance scrolled with three fingers.
+ friend class OverviewGestureHandlerTest;
+
+ // The total distance scrolled with three fingers up to the point when an
+ // action is triggered. When the action (enter / exit overview mode or move
+ // selection in overview) is triggered those values are reset to zero.
float scroll_x_;
float scroll_y_;
+ // The threshold before engaging overview with a touchpad three-finger scroll.
+ static const float vertical_threshold_pixels_;
+
+ // The threshold before moving selector horizontally when using a touchpad
+ // two or three-finger scroll.
+ static const float horizontal_threshold_pixels_;
+
DISALLOW_COPY_AND_ASSIGN(OverviewGestureHandler);
};
« no previous file with comments | « ash/common/wm/overview/window_selector_controller.cc ('k') | ash/wm/gestures/overview_gesture_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698