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

Unified Diff: ash/wm/system_gesture_event_filter.cc

Issue 143023003: Fully support the autohide shelf option for touch UI on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to ToT Created 6 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/wm/system_gesture_event_filter.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/system_gesture_event_filter.cc
diff --git a/ash/wm/system_gesture_event_filter.cc b/ash/wm/system_gesture_event_filter.cc
index a3c492d6c8dc1a1ccb5864972d39df979d786912..d23325d656841887b256ba7f70fbc1de02ad2823 100644
--- a/ash/wm/system_gesture_event_filter.cc
+++ b/ash/wm/system_gesture_event_filter.cc
@@ -13,12 +13,14 @@
#include "ash/shell_window_ids.h"
#include "ash/wm/gestures/long_press_affordance_handler.h"
#include "ash/wm/gestures/overview_gesture_handler.h"
+#include "ash/wm/gestures/shelf_gesture_handler.h"
#include "ash/wm/gestures/system_pinch_handler.h"
#include "ash/wm/window_util.h"
#include "base/command_line.h"
#include "ui/aura/root_window.h"
#include "ui/base/ui_base_switches.h"
#include "ui/events/event.h"
+#include "ui/events/event_constants.h"
#if defined(OS_CHROMEOS)
#include "ui/events/x/touch_factory_x11.h"
@@ -43,7 +45,8 @@ namespace internal {
SystemGestureEventFilter::SystemGestureEventFilter()
: system_gestures_enabled_(CommandLine::ForCurrentProcess()->
HasSwitch(ash::switches::kAshEnableAdvancedGestures)),
- long_press_affordance_(new LongPressAffordanceHandler) {
+ long_press_affordance_(new LongPressAffordanceHandler),
+ shelf_gesture_handler_(new ShelfGestureHandler()) {
if (switches::UseOverviewMode())
overview_gesture_handler_.reset(new OverviewGestureHandler);
}
@@ -85,6 +88,12 @@ void SystemGestureEventFilter::OnGestureEvent(ui::GestureEvent* event) {
return;
}
+ if (event->type() == ui::ET_GESTURE_WIN8_EDGE_SWIPE &&
+ shelf_gesture_handler_->ProcessGestureEvent(*event)) {
+ event->StopPropagation();
+ return;
+ }
+
if (!system_gestures_enabled_)
return;
« no previous file with comments | « ash/wm/system_gesture_event_filter.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698