Index: ui/chromeos/touch_exploration_controller.h |
diff --git a/ui/chromeos/touch_exploration_controller.h b/ui/chromeos/touch_exploration_controller.h |
index 12f0bfa2fcebe0e32d1289d5343f9a0d1dfb0552..bad28737907c28ecbe9b11faaa0c97a47761ba4f 100644 |
--- a/ui/chromeos/touch_exploration_controller.h |
+++ b/ui/chromeos/touch_exploration_controller.h |
@@ -39,6 +39,11 @@ class TouchExplorationControllerDelegate { |
// Takes an int from 0.0 to 100.0 that indicates the percent the volume |
// should be set to. |
virtual void SetOutputLevel(int volume) = 0; |
+ |
+ // This function should be called whenever the delegate should play an earcon. |
+ // In the future a parameter can be passed to indicate what sound should be |
+ // played. |
+ virtual void PlayEarCon() = 0; |
}; |
// TouchExplorationController is used in tandem with "Spoken Feedback" to |
@@ -165,6 +170,8 @@ class UI_CHROMEOS_EXPORT TouchExplorationController |
const ui::TouchEvent& event, scoped_ptr<ui::Event>* rewritten_event); |
ui::EventRewriteStatus InTwoToOneFinger( |
const ui::TouchEvent& event, scoped_ptr<ui::Event>* rewritten_event); |
+ ui::EventRewriteStatus InCornerPassthrough( |
+ const ui::TouchEvent& event, scoped_ptr<ui::Event>* rewritten_event); |
ui::EventRewriteStatus InPassthrough( |
const ui::TouchEvent& event, scoped_ptr<ui::Event>* rewritten_event); |
ui::EventRewriteStatus InGestureInProgress( |
@@ -285,6 +292,11 @@ class UI_CHROMEOS_EXPORT TouchExplorationController |
// happens until all fingers are up. |
TWO_TO_ONE_FINGER, |
+ // If the user has pressed and held down the left corner past long press, |
+ // then as long as they are holding the corner, all subsequent fingers |
+ // registered will be in passthrough. |
+ CORNER_PASSTHROUGH, |
+ |
// If the user is in TWO_TO_ONE_FINGER with two fingers down and presses |
// a third finger, every finger and touch event is passed through until |
// all fingers are released. |
@@ -309,8 +321,11 @@ class UI_CHROMEOS_EXPORT TouchExplorationController |
TOP_EDGE = 1 << 1, |
LEFT_EDGE = 1 << 2, |
BOTTOM_EDGE = 1 << 3, |
+ BOTTOM_LEFT_CORNER = LEFT_EDGE | BOTTOM_EDGE, |
aboxhall
2014/07/24 18:26:34
Very nice!
|
+ BOTTOM_RIGHT_CORNER = RIGHT_EDGE | BOTTOM_EDGE, |
}; |
+ |
aboxhall
2014/07/24 18:26:34
nit: rogue newline
lisayin
2014/07/25 20:11:57
Done.
|
// Given a point, if it is within the given bounds of an edge, returns the |
// edge. If it is within the given bounds of two edges, returns an int with |
// both bits that represent the respective edges turned on. Otherwise returns |
@@ -355,7 +370,8 @@ class UI_CHROMEOS_EXPORT TouchExplorationController |
// the location and id of the touch release is from here. |
scoped_ptr<ui::TouchEvent> last_two_to_one_; |
- // A timer to fire the mouse move event after the double-tap delay. |
+ // A timer to fire to change states if a pre-set action is not completed in |
+ // the allocaated time. |
aboxhall
2014/07/24 18:26:34
nit: allocaated (Dutch?)
lisayin
2014/07/25 20:11:57
Done.
|
base::OneShotTimer<TouchExplorationController> tap_timer_; |
aboxhall
2014/07/24 18:26:34
This may need to be renamed, based on the comment
|
// A timer to fire an indicating sound when sliding to change volume. |
@@ -381,6 +397,10 @@ class UI_CHROMEOS_EXPORT TouchExplorationController |
// This toggles whether VLOGS are turned on or not. |
bool VLOG_on_; |
+ // Indicates if a finger is in the lower left corner waiting for the timer to |
+ // run out. |
+ bool waiting_for_corner_passthrough_; |
+ |
DISALLOW_COPY_AND_ASSIGN(TouchExplorationController); |
}; |