Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2014, Google Inc. All rights reserved. | 2 * Copyright (C) 2014, Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
| 24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
| 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 */ | 27 */ |
| 28 | 28 |
| 29 #ifndef AXObjectCacheImpl_h | 29 #ifndef AXObjectCacheImpl_h |
| 30 #define AXObjectCacheImpl_h | 30 #define AXObjectCacheImpl_h |
| 31 | 31 |
| 32 #include <memory> | 32 #include <memory> |
| 33 #include "core/dom/AXObjectCache.h" | 33 #include "core/dom/AXObjectCacheBase.h" |
| 34 #include "modules/ModulesExport.h" | 34 #include "modules/ModulesExport.h" |
| 35 #include "modules/accessibility/AXObject.h" | 35 #include "modules/accessibility/AXObject.h" |
| 36 #include "platform/wtf/Forward.h" | 36 #include "platform/wtf/Forward.h" |
| 37 #include "platform/wtf/HashMap.h" | 37 #include "platform/wtf/HashMap.h" |
| 38 #include "platform/wtf/HashSet.h" | 38 #include "platform/wtf/HashSet.h" |
| 39 | 39 |
| 40 namespace blink { | 40 namespace blink { |
| 41 | 41 |
| 42 class AbstractInlineTextBox; | 42 class AbstractInlineTextBox; |
| 43 class HTMLAreaElement; | 43 class HTMLAreaElement; |
| 44 class FrameView; | 44 class FrameView; |
| 45 | 45 |
| 46 // This class should only be used from inside the accessibility directory. | 46 // This class should only be used from inside the accessibility directory. |
| 47 class MODULES_EXPORT AXObjectCacheImpl : public AXObjectCache { | 47 class MODULES_EXPORT AXObjectCacheImpl : public AXObjectCacheBase { |
| 48 WTF_MAKE_NONCOPYABLE(AXObjectCacheImpl); | 48 WTF_MAKE_NONCOPYABLE(AXObjectCacheImpl); |
| 49 | 49 |
| 50 public: | 50 public: |
| 51 static AXObjectCache* Create(Document&); | 51 static AXObjectCache* Create(Document&); |
| 52 | 52 |
| 53 explicit AXObjectCacheImpl(Document&); | 53 explicit AXObjectCacheImpl(Document&); |
| 54 ~AXObjectCacheImpl(); | 54 ~AXObjectCacheImpl(); |
|
slangley
2017/05/15 05:27:20
doesn't this need an override?
| |
| 55 DECLARE_VIRTUAL_TRACE(); | 55 DECLARE_VIRTUAL_TRACE(); |
| 56 | 56 |
| 57 AXObject* FocusedObject(); | 57 AXObject* FocusedObject(); |
| 58 | 58 |
| 59 void Dispose() override; | 59 void Dispose() override; |
| 60 | 60 |
| 61 void SelectionChanged(Node*) override; | 61 void SelectionChanged(Node*) override; |
| 62 void ChildrenChanged(Node*) override; | 62 void ChildrenChanged(Node*) override; |
| 63 void ChildrenChanged(LayoutObject*) override; | 63 void ChildrenChanged(LayoutObject*) override; |
| 64 void CheckedStateChanged(Node*) override; | 64 void CheckedStateChanged(Node*) override; |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 121 AXObject* ObjectFromAXID(AXID id) const { return objects_.at(id); } | 121 AXObject* ObjectFromAXID(AXID id) const { return objects_.at(id); } |
| 122 AXObject* Root(); | 122 AXObject* Root(); |
| 123 | 123 |
| 124 // used for objects without backing elements | 124 // used for objects without backing elements |
| 125 AXObject* GetOrCreate(AccessibilityRole); | 125 AXObject* GetOrCreate(AccessibilityRole); |
| 126 AXObject* GetOrCreate(LayoutObject*); | 126 AXObject* GetOrCreate(LayoutObject*); |
| 127 AXObject* GetOrCreate(Node*); | 127 AXObject* GetOrCreate(Node*); |
| 128 AXObject* GetOrCreate(AbstractInlineTextBox*); | 128 AXObject* GetOrCreate(AbstractInlineTextBox*); |
| 129 | 129 |
| 130 // will only return the AXObject if it already exists | 130 // will only return the AXObject if it already exists |
| 131 AXObject* Get(Node*); | 131 AXObject* Get(Node*) override; |
| 132 AXObject* Get(LayoutObject*); | 132 AXObject* Get(LayoutObject*); |
| 133 AXObject* Get(AbstractInlineTextBox*); | 133 AXObject* Get(AbstractInlineTextBox*); |
| 134 | 134 |
| 135 AXObject* FirstAccessibleObjectFromNode(const Node*); | 135 AXObject* FirstAccessibleObjectFromNode(const Node*); |
| 136 | 136 |
| 137 void Remove(AXID); | 137 void Remove(AXID); |
| 138 | 138 |
| 139 void ChildrenChanged(AXObject*); | 139 void ChildrenChanged(AXObject*); |
| 140 | 140 |
| 141 void HandleActiveDescendantChanged(Node*); | 141 void HandleActiveDescendantChanged(Node*); |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 260 // This is the only subclass of AXObjectCache. | 260 // This is the only subclass of AXObjectCache. |
| 261 DEFINE_TYPE_CASTS(AXObjectCacheImpl, AXObjectCache, cache, true, true); | 261 DEFINE_TYPE_CASTS(AXObjectCacheImpl, AXObjectCache, cache, true, true); |
| 262 | 262 |
| 263 bool NodeHasRole(Node*, const String& role); | 263 bool NodeHasRole(Node*, const String& role); |
| 264 // This will let you know if aria-hidden was explicitly set to false. | 264 // This will let you know if aria-hidden was explicitly set to false. |
| 265 bool IsNodeAriaVisible(Node*); | 265 bool IsNodeAriaVisible(Node*); |
| 266 | 266 |
| 267 } // namespace blink | 267 } // namespace blink |
| 268 | 268 |
| 269 #endif | 269 #endif |
| OLD | NEW |