OLD | NEW |
---|---|
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_ACCESSIBILITY_ENABLER_H_ | 5 #ifndef UI_CHROMEOS_TOUCH_ACCESSIBILITY_ENABLER_H_ |
6 #define UI_CHROMEOS_TOUCH_ACCESSIBILITY_ENABLER_H_ | 6 #define UI_CHROMEOS_TOUCH_ACCESSIBILITY_ENABLER_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 12 matching lines...) Expand all Loading... | |
23 class Event; | 23 class Event; |
24 class EventHandler; | 24 class EventHandler; |
25 class TouchEvent; | 25 class TouchEvent; |
26 | 26 |
27 // A delegate to handle commands in response to detected accessibility gesture | 27 // A delegate to handle commands in response to detected accessibility gesture |
28 // events. | 28 // events. |
29 class TouchAccessibilityEnablerDelegate { | 29 class TouchAccessibilityEnablerDelegate { |
30 public: | 30 public: |
31 virtual ~TouchAccessibilityEnablerDelegate() {} | 31 virtual ~TouchAccessibilityEnablerDelegate() {} |
32 | 32 |
33 // Called when we first detect two fingers are held down. | |
34 virtual void OnTwoFingerTouchStart() {} | |
35 | |
36 // Called when the user is no longer holding down two fingers (including | |
37 // releasing one, holding down three, or moving them). | |
38 virtual void OnTwoFingerTouchStop() {} | |
39 | |
oshima
2017/04/10 18:32:08
one suggestion. ash can use ui/chromeos, and chrom
dmazzoni
2017/04/10 18:54:50
To clarify, you're saying AccessibiliiyManager (in
| |
33 // While the user holds down two fingers on a touch screen, which is the | 40 // While the user holds down two fingers on a touch screen, which is the |
34 // gesture to enable spoken feedback (if held down long enough), play a sound | 41 // gesture to enable spoken feedback (if held down long enough), play a sound |
35 // every "tick" (approximately every half-second) to warn the user something | 42 // every "tick" (approximately every half-second) to warn the user something |
36 // is about to happen. | 43 // is about to happen. |
37 virtual void PlaySpokenFeedbackToggleCountdown(int tick_count) {} | 44 virtual void PlaySpokenFeedbackToggleCountdown(int tick_count) {} |
38 | 45 |
39 // Toggles spoken feedback. | 46 // Toggles spoken feedback. |
40 virtual void ToggleSpokenFeedback() {} | 47 virtual void ToggleSpokenFeedback() {} |
41 }; | 48 }; |
42 | 49 |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
110 // When touch_accessibility_enabler gets time relative to real time during | 117 // When touch_accessibility_enabler gets time relative to real time during |
111 // testing, this clock is set to the simulated clock and used. | 118 // testing, this clock is set to the simulated clock and used. |
112 base::TickClock* tick_clock_; | 119 base::TickClock* tick_clock_; |
113 | 120 |
114 DISALLOW_COPY_AND_ASSIGN(TouchAccessibilityEnabler); | 121 DISALLOW_COPY_AND_ASSIGN(TouchAccessibilityEnabler); |
115 }; | 122 }; |
116 | 123 |
117 } // namespace ui | 124 } // namespace ui |
118 | 125 |
119 #endif // UI_CHROMEOS_TOUCH_ACCESSIBILITY_ENABLER_H_ | 126 #endif // UI_CHROMEOS_TOUCH_ACCESSIBILITY_ENABLER_H_ |
OLD | NEW |