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

Unified Diff: ui/views/accessibility/native_view_accessibility.h

Issue 2715543003: Views a11y: Implement AXPlatformNode::FromNativeViewAccessible on all platforms. (Closed)
Patch Set: Rebase 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 ec1e0dbe626e0f256b985e9d75acd184515b5687..a87d81168f993c74bac683175294507b06fd94d6 100644
--- a/ui/views/accessibility/native_view_accessibility.h
+++ b/ui/views/accessibility/native_view_accessibility.h
@@ -42,7 +42,9 @@ class VIEWS_EXPORT NativeViewAccessibility
: public ui::AXPlatformNodeDelegate,
public WidgetObserver {
public:
- static std::unique_ptr<NativeViewAccessibility> Create(View* view);
+ // A method for View to create a new NativeViewAccessibility instance for the
+ // given View. To retrieve the instance for |view|, use GetForView() instead.
+ static std::unique_ptr<NativeViewAccessibility> CreateForView(View* view);
~NativeViewAccessibility() override;
@@ -75,6 +77,10 @@ class VIEWS_EXPORT NativeViewAccessibility
protected:
explicit NativeViewAccessibility(View* view);
+ // Retrieves the NativeViewAccessibility instance for the given View. This
+ // invokes View::GetNativeViewAccessible() to ensure it exists.
+ static NativeViewAccessibility* GetForView(View* view);
+
// Weak. Owns this.
View* view_;
@@ -84,6 +90,9 @@ class VIEWS_EXPORT NativeViewAccessibility
Widget* parent_widget_;
private:
+ // Creates new platform-specific NativeViewAccessibility subclass instances.
+ static NativeViewAccessibility* Create(View* view);
tapted 2017/03/06 01:43:09 Do we need this? (i.e. Why can't we use the curren
Patti Lor 2017/03/13 03:03:26 You're right, it looks like we don't need this any
+
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