Index: ui/chromeos/touch_exploration_controller.cc |
diff --git a/ui/chromeos/touch_exploration_controller.cc b/ui/chromeos/touch_exploration_controller.cc |
index 6288ed18a31b3452ffd5320fae561c3a1ef4539c..584c1a10da0bb5f78ee07d2212c868177ec5a4fe 100644 |
--- a/ui/chromeos/touch_exploration_controller.cc |
+++ b/ui/chromeos/touch_exploration_controller.cc |
@@ -13,6 +13,7 @@ |
#include "ui/aura/window.h" |
#include "ui/aura/window_event_dispatcher.h" |
#include "ui/aura/window_tree_host.h" |
+#include "ui/chromeos/touch_accessibility_enabler.h" |
#include "ui/events/event.h" |
#include "ui/events/event_processor.h" |
#include "ui/events/event_utils.h" |
@@ -40,14 +41,16 @@ void SetTouchAccessibilityFlag(ui::Event* event) { |
TouchExplorationController::TouchExplorationController( |
aura::Window* root_window, |
- TouchExplorationControllerDelegate* delegate) |
+ TouchExplorationControllerDelegate* delegate, |
+ TouchAccessibilityEnabler* touch_accessibility_enabler) |
: root_window_(root_window), |
delegate_(delegate), |
state_(NO_FINGERS_DOWN), |
anchor_point_state_(ANCHOR_POINT_NONE), |
gesture_provider_(new GestureProviderAura(this, this)), |
prev_state_(NO_FINGERS_DOWN), |
- VLOG_on_(true) { |
+ VLOG_on_(true), |
+ touch_accessibility_enabler_(touch_accessibility_enabler) { |
DCHECK(root_window); |
root_window->GetHost()->GetEventSource()->AddEventRewriter(this); |
} |
@@ -84,6 +87,10 @@ ui::EventRewriteStatus TouchExplorationController::RewriteEvent( |
} |
const ui::TouchEvent& touch_event = static_cast<const ui::TouchEvent&>(event); |
+ // Let TouchAccessibilityEnabler process the unrewritten event. |
+ if (touch_accessibility_enabler_) |
+ touch_accessibility_enabler_->HandleTouchEvent(touch_event); |
+ |
if (!exclude_bounds_.IsEmpty()) { |
gfx::Point location = touch_event.location(); |
root_window_->GetHost()->ConvertScreenInPixelsToDIP(&location); |