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

Unified Diff: chrome/browser/ui/views/autofill/autofill_popup_base_view.cc

Issue 2670003002: Accessibility for Autofill Popup View in native code (Closed)
Patch Set: Incorporates Mathieu Perreault's suggestions. Adds NotifyAccessibilityEvent to mouse events in Auto… Created 3 years, 10 months 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/ui/views/autofill/autofill_popup_view_views.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/autofill/autofill_popup_base_view.cc
diff --git a/chrome/browser/ui/views/autofill/autofill_popup_base_view.cc b/chrome/browser/ui/views/autofill/autofill_popup_base_view.cc
index 2f0d3864dd0c2cd67a58662c07da6c57abcf5c3d..e87caa50bffe391dba3cb8bfb96c9a0e9f8f8df3 100644
--- a/chrome/browser/ui/views/autofill/autofill_popup_base_view.cc
+++ b/chrome/browser/ui/views/autofill/autofill_popup_base_view.cc
@@ -125,6 +125,7 @@ bool AutofillPopupBaseView::OnMouseDragged(const ui::MouseEvent& event) {
// We must return true in order to get future OnMouseDragged and
// OnMouseReleased events.
+ NotifyAccessibilityEvent(ui::AX_EVENT_MOUSE_DRAGGED, true);
dmazzoni 2017/02/06 16:27:11 The mouse events aren't meant to be fired directly
csashi 2017/02/25 02:09:16 Done.
return true;
}
@@ -159,13 +160,16 @@ void AutofillPopupBaseView::OnMouseMoved(const ui::MouseEvent& event) {
SetSelection(event.location());
else
ClearSelection();
+ NotifyAccessibilityEvent(ui::AX_EVENT_MOUSE_MOVED, true);
}
bool AutofillPopupBaseView::OnMousePressed(const ui::MouseEvent& event) {
+ NotifyAccessibilityEvent(ui::AX_EVENT_MOUSE_PRESSED, true);
return event.GetClickCount() == 1;
}
void AutofillPopupBaseView::OnMouseReleased(const ui::MouseEvent& event) {
+ NotifyAccessibilityEvent(ui::AX_EVENT_MOUSE_RELEASED, true);
// We only care about the left click.
if (event.IsOnlyLeftMouseButton() && HitTestPoint(event.location()))
AcceptSelection(event.location());
@@ -217,6 +221,7 @@ bool AutofillPopupBaseView::AcceleratorPressed(
void AutofillPopupBaseView::SetSelection(const gfx::Point& point) {
if (delegate_)
delegate_->SetSelectionAtPoint(point);
+ NotifyAccessibilityEvent(ui::AX_EVENT_SELECTION, true);
dmazzoni 2017/02/06 16:27:11 Normally the SELECTION event should be fired on th
csashi 2017/02/25 02:09:16 Done.
}
void AutofillPopupBaseView::AcceptSelection(const gfx::Point& point) {
@@ -230,6 +235,7 @@ void AutofillPopupBaseView::AcceptSelection(const gfx::Point& point) {
void AutofillPopupBaseView::ClearSelection() {
if (delegate_)
delegate_->SelectionCleared();
+ NotifyAccessibilityEvent(ui::AX_EVENT_SELECTION_REMOVE, true);
}
void AutofillPopupBaseView::HideController() {
« no previous file with comments | « no previous file | chrome/browser/ui/views/autofill/autofill_popup_view_views.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698