Index: Source/core/dom/AXObjectCache.h |
diff --git a/Source/core/dom/AXObjectCache.h b/Source/core/dom/AXObjectCache.h |
index 1b4cc368a84ffb4d336d05a0e28cc4df7fc7c961..0ffd1fc273f5ca4bd408b319f49b8d2f9bfd5e44 100644 |
--- a/Source/core/dom/AXObjectCache.h |
+++ b/Source/core/dom/AXObjectCache.h |
@@ -43,7 +43,7 @@ class Widget; |
class CORE_EXPORT AXObjectCache { |
WTF_MAKE_NONCOPYABLE(AXObjectCache); WTF_MAKE_FAST_ALLOCATED(AXObjectCache); |
public: |
- static AXObjectCache* create(Document&); |
+ static PassOwnPtr<AXObjectCache> create(Document&); |
static AXObject* focusedUIElementForPage(const Page*); |
@@ -131,7 +131,7 @@ public: |
virtual const AtomicString& computedRoleForNode(Node*) = 0; |
virtual String computedNameForNode(Node*) = 0; |
- typedef AXObjectCache* (*AXObjectCacheCreateFunction)(Document&); |
+ typedef PassOwnPtr<AXObjectCache> (*AXObjectCacheCreateFunction)(Document&); |
static void init(AXObjectCacheCreateFunction); |
protected: |
@@ -141,19 +141,18 @@ private: |
static AXObjectCacheCreateFunction m_createFunction; |
}; |
-class CORE_EXPORT ScopedAXObjectCache : public RefCounted<ScopedAXObjectCache> { |
+class CORE_EXPORT ScopedAXObjectCache { |
WTF_MAKE_NONCOPYABLE(ScopedAXObjectCache); |
public: |
- explicit ScopedAXObjectCache(Document&); |
- ~ScopedAXObjectCache(); |
+ static PassOwnPtr<ScopedAXObjectCache> create(Document&); |
AXObjectCache* get(); |
- AXObjectCache* operator->(); |
private: |
- Document& m_document; |
+ explicit ScopedAXObjectCache(Document&); |
+ |
+ OwnPtr<AXObjectCache> m_ownedCache; |
AXObjectCache* m_cache; |
- bool m_isScoped; |
}; |
} |