| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef UI_CHROMEOS_TOUCH_EXPLORATION_CONTROLLER_H_ | 5 #ifndef UI_CHROMEOS_TOUCH_EXPLORATION_CONTROLLER_H_ |
| 6 #define UI_CHROMEOS_TOUCH_EXPLORATION_CONTROLLER_H_ | 6 #define UI_CHROMEOS_TOUCH_EXPLORATION_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include "base/time/tick_clock.h" | 8 #include "base/time/tick_clock.h" |
| 9 #include "base/timer/timer.h" | 9 #include "base/timer/timer.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 aura::Window* root_window, | 170 aura::Window* root_window, |
| 171 ui::TouchExplorationControllerDelegate* delegate); | 171 ui::TouchExplorationControllerDelegate* delegate); |
| 172 virtual ~TouchExplorationController(); | 172 virtual ~TouchExplorationController(); |
| 173 | 173 |
| 174 private: | 174 private: |
| 175 friend class TouchExplorationControllerTestApi; | 175 friend class TouchExplorationControllerTestApi; |
| 176 | 176 |
| 177 // Overridden from ui::EventRewriter | 177 // Overridden from ui::EventRewriter |
| 178 virtual ui::EventRewriteStatus RewriteEvent( | 178 virtual ui::EventRewriteStatus RewriteEvent( |
| 179 const ui::Event& event, | 179 const ui::Event& event, |
| 180 scoped_ptr<ui::Event>* rewritten_event) OVERRIDE; | 180 scoped_ptr<ui::Event>* rewritten_event) override; |
| 181 virtual ui::EventRewriteStatus NextDispatchEvent( | 181 virtual ui::EventRewriteStatus NextDispatchEvent( |
| 182 const ui::Event& last_event, scoped_ptr<ui::Event>* new_event) OVERRIDE; | 182 const ui::Event& last_event, scoped_ptr<ui::Event>* new_event) override; |
| 183 | 183 |
| 184 // Event handlers based on the current state - see State, below. | 184 // Event handlers based on the current state - see State, below. |
| 185 ui::EventRewriteStatus InNoFingersDown( | 185 ui::EventRewriteStatus InNoFingersDown( |
| 186 const ui::TouchEvent& event, scoped_ptr<ui::Event>* rewritten_event); | 186 const ui::TouchEvent& event, scoped_ptr<ui::Event>* rewritten_event); |
| 187 ui::EventRewriteStatus InSingleTapPressed( | 187 ui::EventRewriteStatus InSingleTapPressed( |
| 188 const ui::TouchEvent& event, scoped_ptr<ui::Event>* rewritten_event); | 188 const ui::TouchEvent& event, scoped_ptr<ui::Event>* rewritten_event); |
| 189 ui::EventRewriteStatus InSingleTapOrTouchExploreReleased( | 189 ui::EventRewriteStatus InSingleTapOrTouchExploreReleased( |
| 190 const ui::TouchEvent& event, scoped_ptr<ui::Event>* rewritten_event); | 190 const ui::TouchEvent& event, scoped_ptr<ui::Event>* rewritten_event); |
| 191 ui::EventRewriteStatus InDoubleTapPending( | 191 ui::EventRewriteStatus InDoubleTapPending( |
| 192 const ui::TouchEvent& event, scoped_ptr<ui::Event>* rewritten_event); | 192 const ui::TouchEvent& event, scoped_ptr<ui::Event>* rewritten_event); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 | 228 |
| 229 // Dispatch a new event outside of the event rewriting flow. | 229 // Dispatch a new event outside of the event rewriting flow. |
| 230 void DispatchEvent(ui::Event* event); | 230 void DispatchEvent(ui::Event* event); |
| 231 | 231 |
| 232 // Overridden from GestureProviderAuraClient. | 232 // Overridden from GestureProviderAuraClient. |
| 233 // | 233 // |
| 234 // The gesture provider keeps track of all the touch events after | 234 // The gesture provider keeps track of all the touch events after |
| 235 // the user moves fast enough to trigger a gesture. After the user | 235 // the user moves fast enough to trigger a gesture. After the user |
| 236 // completes their gesture, this method will decide what keyboard | 236 // completes their gesture, this method will decide what keyboard |
| 237 // input their gesture corresponded to. | 237 // input their gesture corresponded to. |
| 238 virtual void OnGestureEvent(ui::GestureEvent* gesture) OVERRIDE; | 238 virtual void OnGestureEvent(ui::GestureEvent* gesture) override; |
| 239 | 239 |
| 240 // Process the gesture events that have been created. | 240 // Process the gesture events that have been created. |
| 241 void ProcessGestureEvents(); | 241 void ProcessGestureEvents(); |
| 242 | 242 |
| 243 void OnSwipeEvent(ui::GestureEvent* swipe_gesture); | 243 void OnSwipeEvent(ui::GestureEvent* swipe_gesture); |
| 244 | 244 |
| 245 void SideSlideControl(ui::GestureEvent* gesture); | 245 void SideSlideControl(ui::GestureEvent* gesture); |
| 246 | 246 |
| 247 // Dispatches the keyboard short cut Shift+Search+<arrow key> | 247 // Dispatches the keyboard short cut Shift+Search+<arrow key> |
| 248 // outside the event rewritting flow. | 248 // outside the event rewritting flow. |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 469 std::map<int, base::Closure> right_swipe_gestures_; | 469 std::map<int, base::Closure> right_swipe_gestures_; |
| 470 std::map<int, base::Closure> up_swipe_gestures_; | 470 std::map<int, base::Closure> up_swipe_gestures_; |
| 471 std::map<int, base::Closure> down_swipe_gestures_; | 471 std::map<int, base::Closure> down_swipe_gestures_; |
| 472 | 472 |
| 473 DISALLOW_COPY_AND_ASSIGN(TouchExplorationController); | 473 DISALLOW_COPY_AND_ASSIGN(TouchExplorationController); |
| 474 }; | 474 }; |
| 475 | 475 |
| 476 } // namespace ui | 476 } // namespace ui |
| 477 | 477 |
| 478 #endif // UI_CHROMEOS_TOUCH_EXPLORATION_CONTROLLER_H_ | 478 #endif // UI_CHROMEOS_TOUCH_EXPLORATION_CONTROLLER_H_ |
| OLD | NEW |