| 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/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/time/tick_clock.h" | 9 #include "base/time/tick_clock.h" |
| 10 #include "base/timer/timer.h" | 10 #include "base/timer/timer.h" |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 const ui::TouchEvent& event, | 236 const ui::TouchEvent& event, |
| 237 std::unique_ptr<ui::Event>* rewritten_event); | 237 std::unique_ptr<ui::Event>* rewritten_event); |
| 238 ui::EventRewriteStatus InSlideGesture( | 238 ui::EventRewriteStatus InSlideGesture( |
| 239 const ui::TouchEvent& event, | 239 const ui::TouchEvent& event, |
| 240 std::unique_ptr<ui::Event>* rewritten_event); | 240 std::unique_ptr<ui::Event>* rewritten_event); |
| 241 ui::EventRewriteStatus InTwoFingerTap( | 241 ui::EventRewriteStatus InTwoFingerTap( |
| 242 const ui::TouchEvent& event, | 242 const ui::TouchEvent& event, |
| 243 std::unique_ptr<ui::Event>* rewritten_event); | 243 std::unique_ptr<ui::Event>* rewritten_event); |
| 244 | 244 |
| 245 // Returns the current time of the tick clock. | 245 // Returns the current time of the tick clock. |
| 246 base::TimeDelta Now(); | 246 base::TimeTicks Now(); |
| 247 | 247 |
| 248 // This timer is started every time we get the first press event, and | 248 // This timer is started every time we get the first press event, and |
| 249 // it fires after the double-click timeout elapses (300 ms by default). | 249 // it fires after the double-click timeout elapses (300 ms by default). |
| 250 // If the user taps and releases within 300 ms and doesn't press again, | 250 // If the user taps and releases within 300 ms and doesn't press again, |
| 251 // we treat that as a single mouse move (touch exploration) event. | 251 // we treat that as a single mouse move (touch exploration) event. |
| 252 void StartTapTimer(); | 252 void StartTapTimer(); |
| 253 void OnTapTimerFired(); | 253 void OnTapTimerFired(); |
| 254 | 254 |
| 255 // This timer is started every timer we get the first press event and the | 255 // This timer is started every timer we get the first press event and the |
| 256 // finger is in the corner of the screen. | 256 // finger is in the corner of the screen. |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 // When touch_exploration_controller gets time relative to real time during | 504 // When touch_exploration_controller gets time relative to real time during |
| 505 // testing, this clock is set to the simulated clock and used. | 505 // testing, this clock is set to the simulated clock and used. |
| 506 base::TickClock* tick_clock_; | 506 base::TickClock* tick_clock_; |
| 507 | 507 |
| 508 DISALLOW_COPY_AND_ASSIGN(TouchExplorationController); | 508 DISALLOW_COPY_AND_ASSIGN(TouchExplorationController); |
| 509 }; | 509 }; |
| 510 | 510 |
| 511 } // namespace ui | 511 } // namespace ui |
| 512 | 512 |
| 513 #endif // UI_CHROMEOS_TOUCH_EXPLORATION_CONTROLLER_H_ | 513 #endif // UI_CHROMEOS_TOUCH_EXPLORATION_CONTROLLER_H_ |
| OLD | NEW |