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

Unified Diff: Source/core/dom/AXObjectCache.h

Issue 742353004: Implement computedRole and computedName (behind a flag) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Finished pulling out ScopedAXObjectCache etc. Many fprintfs remain. Created 6 years 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
« no previous file with comments | « no previous file | Source/core/dom/AXObjectCache.cpp » ('j') | Source/core/dom/Document.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | Source/core/dom/AXObjectCache.cpp » ('j') | Source/core/dom/Document.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698