| Index: ui/chromeos/touch_exploration_controller.h
|
| diff --git a/ui/chromeos/touch_exploration_controller.h b/ui/chromeos/touch_exploration_controller.h
|
| index aad8d4c5654611fca9cc1e2a6ae0d563282f4bf0..58bb108a509414e35665b894e3a23c4622102fa2 100644
|
| --- a/ui/chromeos/touch_exploration_controller.h
|
| +++ b/ui/chromeos/touch_exploration_controller.h
|
| @@ -11,6 +11,7 @@
|
| #include "ui/events/event.h"
|
| #include "ui/events/event_rewriter.h"
|
| #include "ui/events/gesture_detection/gesture_detector.h"
|
| +#include "ui/events/gestures/gesture_provider_aura.h"
|
| #include "ui/gfx/geometry/point.h"
|
|
|
| namespace aura {
|
| @@ -22,6 +23,8 @@ namespace ui {
|
| class Event;
|
| class EventHandler;
|
| class TouchEvent;
|
| +class GestureProviderAura;
|
| +class GestureEvent;
|
|
|
| // TouchExplorationController is used in tandem with "Spoken Feedback" to
|
| // make the touch UI accessible.
|
| @@ -79,7 +82,7 @@ class TouchEvent;
|
| // The caller is expected to retain ownership of instances of this class and
|
| // destroy them before |root_window| is destroyed.
|
| class UI_CHROMEOS_EXPORT TouchExplorationController :
|
| - public ui::EventRewriter {
|
| + public ui::EventRewriter, public ui::GestureProviderAuraClient {
|
| public:
|
| explicit TouchExplorationController(aura::Window* root_window);
|
| virtual ~TouchExplorationController();
|
| @@ -107,10 +110,13 @@ class UI_CHROMEOS_EXPORT TouchExplorationController :
|
| const ui::TouchEvent& event, scoped_ptr<ui::Event>* rewritten_event);
|
| ui::EventRewriteStatus InTouchExploration(
|
| const ui::TouchEvent& event, scoped_ptr<ui::Event>* rewritten_event);
|
| + ui::EventRewriteStatus InGestureInProgress(
|
| + const ui::TouchEvent& event, scoped_ptr<ui::Event>* rewritten_event);
|
| ui::EventRewriteStatus InPassthroughMinusOne(
|
| const ui::TouchEvent& event, scoped_ptr<ui::Event>* rewritten_event);
|
| ui::EventRewriteStatus InTouchExploreSecondPress(
|
| const ui::TouchEvent& event, scoped_ptr<ui::Event>* rewritten_event);
|
| +
|
| // This timer is started every time we get the first press event, and
|
| // it fires after the double-click timeout elapses (300 ms by default).
|
| // If the user taps and releases within 300 ms and doesn't press again,
|
| @@ -120,6 +126,12 @@ class UI_CHROMEOS_EXPORT TouchExplorationController :
|
| // Dispatch a new event outside of the event rewriting flow.
|
| void DispatchEvent(ui::Event* event);
|
|
|
| + // The gesture provider keeps track of all the touch events after
|
| + // the user moves fast enough to trigger a gesture. After the user
|
| + // completes their gesture, this method will decide what keyboard
|
| + // input their gesture corresponded to.
|
| + void OnGestureEvent(ui::GestureEvent* gesture) OVERRIDE;
|
| +
|
| scoped_ptr<ui::Event> CreateMouseMoveEvent(const gfx::PointF& location,
|
| int flags);
|
|
|
| @@ -155,6 +167,9 @@ class UI_CHROMEOS_EXPORT TouchExplorationController :
|
| // mode until all fingers are lifted.
|
| TOUCH_EXPLORATION,
|
|
|
| + // We're currently making a gesture.
|
| + GESTURE_IN_PROGRESS,
|
| +
|
| // The user placed two or more fingers down within the grace period.
|
| // We're now in passthrough mode until all fingers are lifted. Initially
|
| // the first finger is ignored and other fingers are passed through
|
| @@ -217,6 +232,9 @@ class UI_CHROMEOS_EXPORT TouchExplorationController :
|
| // timeout and pixel slop constants.
|
| ui::GestureDetector::Config gesture_detector_config_;
|
|
|
| + // Gesture Handler to interpret the touch events
|
| + ui::GestureProviderAura gesture_provider_;
|
| +
|
| // The previous state entered.
|
| State prev_state_;
|
|
|
|
|