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

Side by Side Diff: ui/views/view.h

Issue 2119413004: a11y: Exclude children of nested keyboard accessible controls from a11y tree. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase on top of 2704263002. 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 unified diff | Download patch
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 #ifndef UI_VIEWS_VIEW_H_ 5 #ifndef UI_VIEWS_VIEW_H_
6 #define UI_VIEWS_VIEW_H_ 6 #define UI_VIEWS_VIEW_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 789 matching lines...) Expand 10 before | Expand all | Expand 10 after
800 // Returns the view that should be selected next when pressing Shift-Tab. 800 // Returns the view that should be selected next when pressing Shift-Tab.
801 View* GetPreviousFocusableView(); 801 View* GetPreviousFocusableView();
802 802
803 // Sets the component that should be selected next when pressing Tab, and 803 // Sets the component that should be selected next when pressing Tab, and
804 // makes the current view the precedent view of the specified one. 804 // makes the current view the precedent view of the specified one.
805 // Note that by default views are linked in the order they have been added to 805 // Note that by default views are linked in the order they have been added to
806 // their container. Use this method if you want to modify the order. 806 // their container. Use this method if you want to modify the order.
807 // IMPORTANT NOTE: loops in the focus hierarchy are not supported. 807 // IMPORTANT NOTE: loops in the focus hierarchy are not supported.
808 void SetNextFocusableView(View* view); 808 void SetNextFocusableView(View* view);
809 809
810 // Sets |focus_behavior| and advances focus if necessary. 810 // Gets/sets |focus_behavior|. SetFocusBehavior() advances focus if necessary.
811 FocusBehavior focus_behavior() const { return focus_behavior_; }
811 void SetFocusBehavior(FocusBehavior focus_behavior); 812 void SetFocusBehavior(FocusBehavior focus_behavior);
812 813
813 // Returns true if this view is focusable, |enabled_| and drawn. 814 // Returns true if this view is focusable, |enabled_| and drawn.
814 bool IsFocusable() const; 815 bool IsFocusable() const;
815 816
816 // Return whether this view is focusable when the user requires full keyboard 817 // Return whether this view is focusable when the user requires full keyboard
817 // access, even though it may not be normally focusable. 818 // access, even though it may not be normally focusable.
818 bool IsAccessibilityFocusable() const; 819 bool IsAccessibilityFocusable() const;
819 820
820 // Convenience method to retrieve the FocusManager associated with the 821 // Convenience method to retrieve the FocusManager associated with the
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
1175 // with an associated view. Widget::ReorderNativeViews() may reorder layers 1176 // with an associated view. Widget::ReorderNativeViews() may reorder layers
1176 // below layers owned by a view. 1177 // below layers owned by a view.
1177 virtual void ReorderChildLayers(ui::Layer* parent_layer); 1178 virtual void ReorderChildLayers(ui::Layer* parent_layer);
1178 1179
1179 // Input --------------------------------------------------------------------- 1180 // Input ---------------------------------------------------------------------
1180 1181
1181 virtual DragInfo* GetDragInfo(); 1182 virtual DragInfo* GetDragInfo();
1182 1183
1183 // Focus --------------------------------------------------------------------- 1184 // Focus ---------------------------------------------------------------------
1184 1185
1185 // Returns last set focus behavior.
1186 FocusBehavior focus_behavior() const { return focus_behavior_; }
1187
1188 // Override to be notified when focus has changed either to or from this View. 1186 // Override to be notified when focus has changed either to or from this View.
1189 virtual void OnFocus(); 1187 virtual void OnFocus();
1190 virtual void OnBlur(); 1188 virtual void OnBlur();
1191 1189
1192 // Handle view focus/blur events for this view. 1190 // Handle view focus/blur events for this view.
1193 void Focus(); 1191 void Focus();
1194 void Blur(); 1192 void Blur();
1195 1193
1196 // System events ------------------------------------------------------------- 1194 // System events -------------------------------------------------------------
1197 1195
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
1609 // Drag and drop ------------------------------------------------------------- 1607 // Drag and drop -------------------------------------------------------------
1610 1608
1611 DragController* drag_controller_; 1609 DragController* drag_controller_;
1612 1610
1613 // Input -------------------------------------------------------------------- 1611 // Input --------------------------------------------------------------------
1614 1612
1615 std::unique_ptr<ViewTargeter> targeter_; 1613 std::unique_ptr<ViewTargeter> targeter_;
1616 1614
1617 // Accessibility ------------------------------------------------------------- 1615 // Accessibility -------------------------------------------------------------
1618 1616
1619 // Belongs to this view, but it's reference-counted on some platforms 1617 // The accessibility element used to represent this View.
1620 // so we can't use a scoped_ptr. It's dereferenced in the destructor. 1618 std::unique_ptr<NativeViewAccessibility> native_view_accessibility_;
1621 NativeViewAccessibility* native_view_accessibility_;
1622 1619
1623 // Observers ------------------------------------------------------------- 1620 // Observers -------------------------------------------------------------
1624 1621
1625 base::ObserverList<ViewObserver> observers_; 1622 base::ObserverList<ViewObserver> observers_;
1626 1623
1627 DISALLOW_COPY_AND_ASSIGN(View); 1624 DISALLOW_COPY_AND_ASSIGN(View);
1628 }; 1625 };
1629 1626
1630 } // namespace views 1627 } // namespace views
1631 1628
1632 #endif // UI_VIEWS_VIEW_H_ 1629 #endif // UI_VIEWS_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698