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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 const ui::TouchEvent& event, | 224 const ui::TouchEvent& event, |
225 std::unique_ptr<ui::Event>* rewritten_event); | 225 std::unique_ptr<ui::Event>* rewritten_event); |
226 ui::EventRewriteStatus InSlideGesture( | 226 ui::EventRewriteStatus InSlideGesture( |
227 const ui::TouchEvent& event, | 227 const ui::TouchEvent& event, |
228 std::unique_ptr<ui::Event>* rewritten_event); | 228 std::unique_ptr<ui::Event>* rewritten_event); |
229 ui::EventRewriteStatus InTwoFingerTap( | 229 ui::EventRewriteStatus InTwoFingerTap( |
230 const ui::TouchEvent& event, | 230 const ui::TouchEvent& event, |
231 std::unique_ptr<ui::Event>* rewritten_event); | 231 std::unique_ptr<ui::Event>* rewritten_event); |
232 | 232 |
233 // Returns the current time of the tick clock. | 233 // Returns the current time of the tick clock. |
234 base::TimeDelta Now(); | 234 base::TimeTicks Now(); |
235 | 235 |
236 // This timer is started every time we get the first press event, and | 236 // This timer is started every time we get the first press event, and |
237 // it fires after the double-click timeout elapses (300 ms by default). | 237 // it fires after the double-click timeout elapses (300 ms by default). |
238 // If the user taps and releases within 300 ms and doesn't press again, | 238 // If the user taps and releases within 300 ms and doesn't press again, |
239 // we treat that as a single mouse move (touch exploration) event. | 239 // we treat that as a single mouse move (touch exploration) event. |
240 void StartTapTimer(); | 240 void StartTapTimer(); |
241 void OnTapTimerFired(); | 241 void OnTapTimerFired(); |
242 | 242 |
243 // This timer is started every timer we get the first press event and the | 243 // This timer is started every timer we get the first press event and the |
244 // finger is in the corner of the screen. | 244 // finger is in the corner of the screen. |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
474 // When touch_exploration_controller gets time relative to real time during | 474 // When touch_exploration_controller gets time relative to real time during |
475 // testing, this clock is set to the simulated clock and used. | 475 // testing, this clock is set to the simulated clock and used. |
476 base::TickClock* tick_clock_; | 476 base::TickClock* tick_clock_; |
477 | 477 |
478 DISALLOW_COPY_AND_ASSIGN(TouchExplorationController); | 478 DISALLOW_COPY_AND_ASSIGN(TouchExplorationController); |
479 }; | 479 }; |
480 | 480 |
481 } // namespace ui | 481 } // namespace ui |
482 | 482 |
483 #endif // UI_CHROMEOS_TOUCH_EXPLORATION_CONTROLLER_H_ | 483 #endif // UI_CHROMEOS_TOUCH_EXPLORATION_CONTROLLER_H_ |
OLD | NEW |