Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(271)

Unified Diff: ui/chromeos/touch_exploration_controller.cc

Issue 2476843003: Toggle spoken feedback if two fingers are held down. (Closed)
Patch Set: Send events from TouchExplorationController to TouchAccessibilityEnabler Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/chromeos/touch_exploration_controller.cc
diff --git a/ui/chromeos/touch_exploration_controller.cc b/ui/chromeos/touch_exploration_controller.cc
index 985779fab79b6e87892c73cb3298da4be935e64f..f362fbb2d5e1f21ea274b3211b3ce7865ffbd5f0 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,7 +41,8 @@ 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),
@@ -84,6 +86,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()->ConvertPointFromNativeScreen(&location);

Powered by Google App Engine
This is Rietveld 408576698