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

Unified Diff: ui/views/accessibility/native_view_accessibility.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 side-by-side diff with in-line comments
Download patch
Index: ui/views/accessibility/native_view_accessibility.h
diff --git a/ui/views/accessibility/native_view_accessibility.h b/ui/views/accessibility/native_view_accessibility.h
index df9880e44b331627cf5fb4aa470591fcef6c7c53..9247ec025bfc9db3422924c8c42d4516be29e019 100644
--- a/ui/views/accessibility/native_view_accessibility.h
+++ b/ui/views/accessibility/native_view_accessibility.h
@@ -40,13 +40,17 @@ class VIEWS_EXPORT NativeViewAccessibility
: public ui::AXPlatformNodeDelegate,
public WidgetObserver {
public:
- static NativeViewAccessibility* Create(View* view);
+ // A method for View to create a new NativeViewAccessibility instance for the
+ // given View. To retrieve an instance for |view|, use GetForView() instead.
+ static std::unique_ptr<NativeViewAccessibility> CreateForView(View* view);
tapted 2017/02/21 06:01:11 Let's move the unique_ptr/Destroy/CreateForView ch
Patti Lor 2017/02/27 05:31:04 Done.
- gfx::NativeViewAccessible GetNativeObject();
+ // Retrieves the NativeViewAccessibility instance for the given View. This
+ // calls CreateForView() if it doesn't yet exist.
tapted 2017/02/21 06:01:11 Can we instead say "Invokes View::GetNativeViewAcc
Patti Lor 2017/02/27 05:31:04 Done.
+ static NativeViewAccessibility* GetForView(View* view);
+
+ ~NativeViewAccessibility() override;
- // Call Destroy rather than deleting this, because the subclass may
- // use reference counting.
- virtual void Destroy();
+ gfx::NativeViewAccessible GetNativeObject();
void NotifyAccessibilityEvent(ui::AXEvent event_type);
@@ -74,7 +78,6 @@ class VIEWS_EXPORT NativeViewAccessibility
protected:
NativeViewAccessibility(View* view);
- ~NativeViewAccessibility() override;
// Weak. Owns this.
View* view_;
@@ -85,6 +88,9 @@ class VIEWS_EXPORT NativeViewAccessibility
Widget* parent_widget_;
private:
+ // Creates new platform-specific NativeViewAccessibility subclass instances.
+ static NativeViewAccessibility* Create(View* view);
+
void PopulateChildWidgetVector(std::vector<Widget*>* result_child_widgets);
// We own this, but it is reference-counted on some platforms so we can't use

Powered by Google App Engine
This is Rietveld 408576698