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

Unified Diff: ui/views/view.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 | « ui/views/view.h ('k') | ui/views/widget/native_widget_aura.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/view.cc
diff --git a/ui/views/view.cc b/ui/views/view.cc
index e085544e1a524354f2a09cfd51a9e5e5b6ac5266..c6d3eb317b8aa6320a992b5e8a517b59d87116cf 100644
--- a/ui/views/view.cc
+++ b/ui/views/view.cc
@@ -1028,8 +1028,6 @@ void View::OnMouseEvent(ui::MouseEvent* event) {
break;
case ui::ET_MOUSE_ENTERED:
- if (event->flags() & ui::EF_TOUCH_ACCESSIBILITY)
- NotifyAccessibilityEvent(ui::AX_EVENT_HOVER, true);
OnMouseEntered(*event);
break;
@@ -1052,6 +1050,32 @@ void View::OnTouchEvent(ui::TouchEvent* event) {
void View::OnGestureEvent(ui::GestureEvent* event) {
}
+void View::OnAccessibilityMouseEvent(ui::MouseEvent* event) {
+ switch (event->type()) {
+ case ui::ET_MOUSE_PRESSED:
+ NotifyAccessibilityEvent(ui::AX_EVENT_MOUSE_PRESSED, true);
+ break;
+ case ui::ET_MOUSE_DRAGGED:
+ NotifyAccessibilityEvent(ui::AX_EVENT_MOUSE_DRAGGED, true);
+ break;
+ case ui::ET_MOUSE_RELEASED:
+ NotifyAccessibilityEvent(ui::AX_EVENT_MOUSE_RELEASED, true);
+ break;
+ case ui::ET_MOUSE_MOVED:
+ NotifyAccessibilityEvent(ui::AX_EVENT_MOUSE_MOVED, true);
+ break;
+ case ui::ET_MOUSE_ENTERED:
+ NotifyAccessibilityEvent(ui::AX_EVENT_MOUSE_ENTERED, true);
+ break;
+ case ui::ET_MOUSE_EXITED:
+ NotifyAccessibilityEvent(ui::AX_EVENT_MOUSE_EXITED, true);
+ break;
+ default:
+ NOTREACHED();
+ break;
+ }
+}
+
const ui::InputMethod* View::GetInputMethod() const {
Widget* widget = const_cast<Widget*>(GetWidget());
return widget ? const_cast<const ui::InputMethod*>(widget->GetInputMethod())
« no previous file with comments | « ui/views/view.h ('k') | ui/views/widget/native_widget_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698