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

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

Issue 14195016: Add in gesture for immersive mode (Closed) Base URL: https://codereview.chromium.org/13315002/
Patch Set: Created 7 years, 8 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/gestures/border_gesture_handler.h
diff --git a/ash/wm/gestures/border_gesture_handler.h b/ash/wm/gestures/border_gesture_handler.h
index b0b1d9a5fcbc7d5d500ed7437266373ad3bd70ef..2bbbe76c9008fcad3a89fd807105f48e8f85f9c2 100644
--- a/ash/wm/gestures/border_gesture_handler.h
+++ b/ash/wm/gestures/border_gesture_handler.h
@@ -46,6 +46,12 @@ enum BorderLocation {
typedef std::bitset<NUM_BORDER_LOCATIONS> BorderFlags;
+enum BorderGestureType {
+ BORDER_GESTURE_TYPE_LAUNCHER,
+ BORDER_GESTURE_TYPE_IMMERSIVE,
+ BORDER_GESTURE_TYPE_UNKNOWN
+};
+
// Handles touch gestures that occur around the border of the display area that
// might have actions associated with them. It handles both gestures that
// require a bezel sensor (bezel gestures) and those that do not (edge
@@ -60,8 +66,13 @@ class BorderGestureHandler {
bool ProcessGestureEvent(aura::Window* target, const ui::GestureEvent& event);
private:
- // Handle events meant for showing the launcher. Returns true when no further
- // events from this gesture should be sent.
+ // Handle events meant for showing tabstrip in immersive mode. Returns true
+ // when the event has been consumed, false otherwise.
+ bool HandleImmersiveControl(aura::Window* target,
+ const ui::GestureEvent& event);
+
+ // Handle events meant for showing the launcher. Returns true
+ // when the event has been consumed, false otherwise.
bool HandleLauncherControl(const ui::GestureEvent& event);
bool HandleBorderGestureStart(aura::Window* target,
@@ -83,6 +94,10 @@ class BorderGestureHandler {
// Returns true when the orientation has been successfully determined.
bool DetermineGestureOrientation(const ui::GestureEvent& event);
+ // Test if the gesture orientation makes sense to be trying to display the
+ // tabstrip in immersive mode.
+ bool IsGestureInImmersiveOrientation(const ui::GestureEvent& event);
+
// Test if the gesture orientation makes sense to be dragging in or out the
// launcher.
bool IsGestureInLauncherOrientation(const ui::GestureEvent& event);
@@ -95,6 +110,10 @@ class BorderGestureHandler {
// Orientation relative to the screen that the gesture is moving in
BorderScrollOrientation orientation_;
+ // Allows tracking of current gesture type, so if a new one starts the handler
+ // can end the previous gesture
+ BorderGestureType gesture_type_;
sadrul 2013/04/19 01:41:20 It doesn't look like you are using gesture_type_?
rharrison 2013/04/22 18:36:52 This I think was left over cruft from something I
+
ShelfGestureHandler shelf_handler_;
DISALLOW_COPY_AND_ASSIGN(BorderGestureHandler);

Powered by Google App Engine
This is Rietveld 408576698