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

Unified Diff: ash/wm/system_gesture_event_filter.h

Issue 10383108: Adding four bezel gestures (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixing build breakage Created 8 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 | « ash/volume_control_delegate.h ('k') | ash/wm/system_gesture_event_filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/system_gesture_event_filter.h
diff --git a/ash/wm/system_gesture_event_filter.h b/ash/wm/system_gesture_event_filter.h
index fe58711d7e1b350812e4f8072f267b70f8da20aa..f240691501eb26d0fe5eafc813e135b28fe50a51 100644
--- a/ash/wm/system_gesture_event_filter.h
+++ b/ash/wm/system_gesture_event_filter.h
@@ -18,6 +18,20 @@ class Window;
namespace ash {
namespace internal {
+enum BezelStart {
+ BEZEL_START_UNSET = 0,
+ BEZEL_START_TOP,
+ BEZEL_START_LEFT,
+ BEZEL_START_RIGHT,
+ BEZEL_START_BOTTOM
+};
+
+enum ScrollOrientation {
+ SCROLL_ORIENTATION_UNSET = 0,
+ SCROLL_ORIENTATION_HORIZONTAL,
+ SCROLL_ORIENTATION_VERTICAL
+};
+
// An event filter which handles system level gesture events.
class SystemGestureEventFilter : public aura::EventFilter {
public:
@@ -36,6 +50,31 @@ class SystemGestureEventFilter : public aura::EventFilter {
aura::GestureEvent* event) OVERRIDE;
private:
+ // Handle events meant for volume / brightness. Returns true when no further
+ // events from this gesture should be sent.
+ bool HandleDeviceControl(aura::GestureEvent* event);
+
+ // Handle events meant for showing the launcher. Returns true when no further
+ // events from this gesture should be sent.
+ bool HandleLauncherControl(aura::GestureEvent* event);
+
+ // Handle events meant to switch through applications. Returns true when no
+ // further events from this gesture should be sent.
+ bool HandleApplicationControl(aura::GestureEvent* event);
+
+ // The percentage of the screen to the left and right which belongs to
+ // device gestures.
+ const int overlap_percent_;
+
+ // Which bezel corner are we on.
+ BezelStart start_location_;
+
+ // Which orientation are we moving.
+ ScrollOrientation orientation_;
+
+ // A device swipe gesture is in progress.
+ bool is_scrubbing_;
+
DISALLOW_COPY_AND_ASSIGN(SystemGestureEventFilter);
};
« no previous file with comments | « ash/volume_control_delegate.h ('k') | ash/wm/system_gesture_event_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698