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

Side by Side Diff: ui/views/accessible_pane_view.cc

Issue 2477463003: Replace ui::AXViewState with AXNodeData and AXActionData (Closed)
Patch Set: Fix test Created 4 years, 1 month 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/accessible_pane_view.h ('k') | ui/views/bubble/bubble_dialog_delegate.cc » ('j') | 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/accessible_pane_view.h" 5 #include "ui/views/accessible_pane_view.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "ui/accessibility/ax_view_state.h" 9 #include "ui/accessibility/ax_node_data.h"
10 #include "ui/views/focus/focus_search.h" 10 #include "ui/views/focus/focus_search.h"
11 #include "ui/views/focus/view_storage.h" 11 #include "ui/views/focus/view_storage.h"
12 #include "ui/views/widget/widget.h" 12 #include "ui/views/widget/widget.h"
13 13
14 namespace views { 14 namespace views {
15 15
16 // Create tiny subclass of FocusSearch that overrides GetParent and Contains, 16 // Create tiny subclass of FocusSearch that overrides GetParent and Contains,
17 // delegating these to methods in AccessiblePaneView. This is needed so that 17 // delegating these to methods in AccessiblePaneView. This is needed so that
18 // subclasses of AccessiblePaneView can customize the focus search logic and 18 // subclasses of AccessiblePaneView can customize the focus search logic and
19 // include views that aren't part of the AccessiblePaneView's view 19 // include views that aren't part of the AccessiblePaneView's view
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 } 201 }
202 202
203 void AccessiblePaneView::SetVisible(bool flag) { 203 void AccessiblePaneView::SetVisible(bool flag) {
204 if (visible() && !flag && pane_has_focus_) { 204 if (visible() && !flag && pane_has_focus_) {
205 RemovePaneFocus(); 205 RemovePaneFocus();
206 focus_manager_->RestoreFocusedView(); 206 focus_manager_->RestoreFocusedView();
207 } 207 }
208 View::SetVisible(flag); 208 View::SetVisible(flag);
209 } 209 }
210 210
211 void AccessiblePaneView::GetAccessibleState(ui::AXViewState* state) { 211 void AccessiblePaneView::GetAccessibleNodeData(ui::AXNodeData* node_data) {
212 state->role = ui::AX_ROLE_PANE; 212 node_data->role = ui::AX_ROLE_PANE;
213 } 213 }
214 214
215 void AccessiblePaneView::RequestFocus() { 215 void AccessiblePaneView::RequestFocus() {
216 SetPaneFocusAndFocusDefault(); 216 SetPaneFocusAndFocusDefault();
217 } 217 }
218 218
219 //////////////////////////////////////////////////////////////////////////////// 219 ////////////////////////////////////////////////////////////////////////////////
220 // FocusChangeListener overrides: 220 // FocusChangeListener overrides:
221 221
222 void AccessiblePaneView::OnWillChangeFocus(views::View* focused_before, 222 void AccessiblePaneView::OnWillChangeFocus(views::View* focused_before,
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 DCHECK(pane_has_focus_); 254 DCHECK(pane_has_focus_);
255 return NULL; 255 return NULL;
256 } 256 }
257 257
258 views::View* AccessiblePaneView::GetFocusTraversableParentView() { 258 views::View* AccessiblePaneView::GetFocusTraversableParentView() {
259 DCHECK(pane_has_focus_); 259 DCHECK(pane_has_focus_);
260 return NULL; 260 return NULL;
261 } 261 }
262 262
263 } // namespace views 263 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/accessible_pane_view.h ('k') | ui/views/bubble/bubble_dialog_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698