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

Side by Side Diff: ui/views/bubble/bubble_dialog_delegate.cc

Issue 2860883003: A11y: Add/refactor methods for manipulating bitfields on AXNodeData. (Closed)
Patch Set: Revert comment. Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/views/bubble/bubble_dialog_delegate.h" 5 #include "ui/views/bubble/bubble_dialog_delegate.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 #include "ui/accessibility/ax_node_data.h" 8 #include "ui/accessibility/ax_node_data.h"
9 #include "ui/base/default_style.h" 9 #include "ui/base/default_style.h"
10 #include "ui/base/material_design/material_design_controller.h" 10 #include "ui/base/material_design/material_design_controller.h"
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 anchor_widget()->GetTopLevelWidget()) { 313 anchor_widget()->GetTopLevelWidget()) {
314 anchor_widget()->GetTopLevelWidget()->SetAlwaysRenderAsActive(visible); 314 anchor_widget()->GetTopLevelWidget()->SetAlwaysRenderAsActive(visible);
315 } 315 }
316 316
317 // Fire AX_EVENT_ALERT for bubbles marked as AX_ROLE_ALERT_DIALOG; this 317 // Fire AX_EVENT_ALERT for bubbles marked as AX_ROLE_ALERT_DIALOG; this
318 // instructs accessibility tools to read the bubble in its entirety rather 318 // instructs accessibility tools to read the bubble in its entirety rather
319 // than just its title and initially focused view. See 319 // than just its title and initially focused view. See
320 // http://crbug.com/474622 for details. 320 // http://crbug.com/474622 for details.
321 if (widget == GetWidget() && visible) { 321 if (widget == GetWidget() && visible) {
322 ui::AXNodeData node_data; 322 ui::AXNodeData node_data;
323 node_data.ClearBitfields();
323 GetAccessibleNodeData(&node_data); 324 GetAccessibleNodeData(&node_data);
324 if (node_data.role == ui::AX_ROLE_ALERT_DIALOG) 325 if (node_data.role == ui::AX_ROLE_ALERT_DIALOG)
325 NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true); 326 NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true);
326 } 327 }
327 } 328 }
328 329
329 } // namespace views 330 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698