Chromium Code Reviews| 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 |