Chromium Code Reviews| Index: Source/core/dom/AXObjectCache.h |
| diff --git a/Source/core/dom/AXObjectCache.h b/Source/core/dom/AXObjectCache.h |
| index a389c0d7f446208d0f70627e9f63122190d1accf..959d1355a53b986ec3c64e775659168fb8f59722 100644 |
| --- a/Source/core/dom/AXObjectCache.h |
| +++ b/Source/core/dom/AXObjectCache.h |
| @@ -38,6 +38,12 @@ class Page; |
| class RenderMenuList; |
| class Widget; |
| +class PublicAXObject { |
|
dmazzoni
2014/12/09 00:49:50
The problem with this is that it exposes the whole
aboxhall
2014/12/13 01:38:36
I guess I had in mind something like this proposal
|
| +public: |
| + virtual const AtomicString& computedRole() = 0; |
| + virtual const String computedText() = 0; |
| +}; |
| + |
| class AXObjectCache { |
| WTF_MAKE_NONCOPYABLE(AXObjectCache); WTF_MAKE_FAST_ALLOCATED; |
| public: |
| @@ -120,10 +126,27 @@ public: |
| virtual void handleLayoutComplete(RenderObject*) = 0; |
| virtual void handleScrolledToAnchor(const Node* anchorNode) = 0; |
| + virtual PublicAXObject* publicAXObjectForNode(Node*) = 0; |
| + |
| protected: |
| AXObjectCache(); |
| }; |
| +class ScopedAXObjectCache { |
| +public: |
| + explicit ScopedAXObjectCache(Document&); |
| + ~ScopedAXObjectCache(); |
| + |
| + AXObjectCache* get(); |
| + AXObjectCache* operator->(); |
| + |
| +private: |
| + |
| + Document& m_document; |
| + AXObjectCache* m_cache; |
| + bool m_isScoped; |
| +}; |
| + |
| } |
| #endif |