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

Side by Side Diff: ui/views/window/dialog_delegate.cc

Issue 2980713002: Views a11y: Obey DialogDelegate::GetAccessibleWindowRole() rather than making a dialog-within-a-dia… (Closed)
Patch Set: Fix test Created 3 years, 5 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
« no previous file with comments | « ui/views/window/dialog_delegate.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/window/dialog_delegate.h" 5 #include "ui/views/window/dialog_delegate.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/histogram_macros.h" 10 #include "base/metrics/histogram_macros.h"
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 } 250 }
251 251
252 const Widget* DialogDelegateView::GetWidget() const { 252 const Widget* DialogDelegateView::GetWidget() const {
253 return View::GetWidget(); 253 return View::GetWidget();
254 } 254 }
255 255
256 View* DialogDelegateView::GetContentsView() { 256 View* DialogDelegateView::GetContentsView() {
257 return this; 257 return this;
258 } 258 }
259 259
260 void DialogDelegateView::GetAccessibleNodeData(ui::AXNodeData* node_data) {
261 node_data->SetName(GetWindowTitle());
msw 2017/07/12 17:14:34 Where does the window title get pushed into the ax
tapted 2017/07/12 23:29:57 This still happens in RootView: void RootView::Ge
262 node_data->role = ui::AX_ROLE_DIALOG;
263 }
264
265 void DialogDelegateView::ViewHierarchyChanged( 260 void DialogDelegateView::ViewHierarchyChanged(
266 const ViewHierarchyChangedDetails& details) { 261 const ViewHierarchyChangedDetails& details) {
267 if (details.is_add && details.child == this && GetWidget()) 262 if (details.is_add && details.child == this && GetWidget())
268 NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true); 263 NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true);
269 } 264 }
270 265
271 } // namespace views 266 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/window/dialog_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698