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 f4d61b3f87919fc25799dea2ae7c171ad2c9af63..c5db64bae7a1d8e49838867f129482988a4471a3 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,11 @@ class VIEWS_EXPORT NativeViewAccessibility |
| : public ui::AXPlatformNodeDelegate, |
| public WidgetObserver { |
| public: |
| - static NativeViewAccessibility* Create(View* view); |
| + static NativeViewAccessibility* GetOrCreate(View* view); |
| - gfx::NativeViewAccessible GetNativeObject(); |
| + ~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); |
| @@ -70,7 +70,6 @@ class VIEWS_EXPORT NativeViewAccessibility |
| protected: |
| NativeViewAccessibility(View* view); |
| - ~NativeViewAccessibility() override; |
| // Weak. Owns this. |
| View* view_; |
| @@ -81,6 +80,12 @@ class VIEWS_EXPORT NativeViewAccessibility |
| Widget* parent_widget_; |
| private: |
| + // A static map from every View to its associated NativeViewAccessibility. |
| + typedef std::map<View*, NativeViewAccessibility*> NativeViewAccessibilityMap; |
|
tapted
2017/01/11 18:27:39
can this (and the <map> #include) move into the .c
Patti Lor
2017/02/21 03:29:16
Deleted as no longer needed :) Thanks for your sug
|
| + |
| + // 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 |