| 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 f4d61b3f87919fc25799dea2ae7c171ad2c9af63..c419a6dc66c8fd52a7c7b8556c6ad7e8bc246ba7 100644
|
| --- a/ui/views/accessibility/native_view_accessibility.h
|
| +++ b/ui/views/accessibility/native_view_accessibility.h
|
| @@ -5,6 +5,8 @@
|
| #ifndef UI_VIEWS_ACCESSIBILITY_NATIVE_VIEW_ACCESSIBILITY_H_
|
| #define UI_VIEWS_ACCESSIBILITY_NATIVE_VIEW_ACCESSIBILITY_H_
|
|
|
| +#include <map>
|
| +
|
| #include "base/macros.h"
|
| #include "build/build_config.h"
|
| #include "ui/accessibility/ax_action_data.h"
|
| @@ -36,13 +38,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);
|
|
|
| - gfx::NativeViewAccessible GetNativeObject();
|
| + // Retrieves the NativeViewAccessibility instance for the given View. This
|
| + // calls CreateForView() if it doesn't yet exist.
|
| + static NativeViewAccessibility* GetForView(View* view);
|
|
|
| - // Call Destroy rather than deleting this, because the subclass may
|
| - // use reference counting.
|
| - virtual void Destroy();
|
| + ~NativeViewAccessibility() override;
|
| +
|
| + gfx::NativeViewAccessible GetNativeObject();
|
|
|
| void NotifyAccessibilityEvent(ui::AXEvent event_type);
|
|
|
| @@ -70,7 +76,6 @@ class VIEWS_EXPORT NativeViewAccessibility
|
|
|
| protected:
|
| NativeViewAccessibility(View* view);
|
| - ~NativeViewAccessibility() override;
|
|
|
| // Weak. Owns this.
|
| View* view_;
|
| @@ -81,6 +86,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
|
|
|