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

Unified Diff: chrome/browser/chromeos/accessibility/spoken_feedback_event_rewriter.cc

Issue 1536493002: Working proof of concept of select to speak (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Drag across multiple objects Created 5 years 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
« no previous file with comments | « no previous file | chrome/browser/resources/chromeos/chromevox/chromevox.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/accessibility/spoken_feedback_event_rewriter.cc
diff --git a/chrome/browser/chromeos/accessibility/spoken_feedback_event_rewriter.cc b/chrome/browser/chromeos/accessibility/spoken_feedback_event_rewriter.cc
index f7421b4bb1933999e8f91c9cd0c0e354a9af6bdf..0f7995f02be82e93ad22f614a3fe8a801de71582 100644
--- a/chrome/browser/chromeos/accessibility/spoken_feedback_event_rewriter.cc
+++ b/chrome/browser/chromeos/accessibility/spoken_feedback_event_rewriter.cc
@@ -116,6 +116,19 @@ ui::EventRewriteStatus SpokenFeedbackEventRewriter::RewriteEvent(
if (!delegate_->IsSpokenFeedbackEnabled())
return ui::EVENT_REWRITE_CONTINUE;
+ if (event.IsMouseEvent()) {
+ const auto& mouse_event = static_cast<const ui::MouseEvent&>(event);
+ scoped_ptr<ui::MouseEvent> ax_mouse_event(
+ new ui::MouseEvent(mouse_event.type(),
+ mouse_event.location(),
+ mouse_event.root_location(),
+ mouse_event.time_stamp(),
+ mouse_event.flags() | ui::EF_TOUCH_ACCESSIBILITY,
+ mouse_event.changed_button_flags()));
+ *new_event = ax_mouse_event.Pass();
+ return ui::EVENT_REWRITE_REWRITTEN;
+ }
+
if ((event.type() != ui::ET_KEY_PRESSED &&
event.type() != ui::ET_KEY_RELEASED))
return ui::EVENT_REWRITE_CONTINUE;
« no previous file with comments | « no previous file | chrome/browser/resources/chromeos/chromevox/chromevox.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698