OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef InspectorAccessibilityAgent_h | 5 #ifndef InspectorAccessibilityAgent_h |
6 #define InspectorAccessibilityAgent_h | 6 #define InspectorAccessibilityAgent_h |
7 | 7 |
8 #include "core/inspector/InspectorBaseAgent.h" | 8 #include "core/inspector/InspectorBaseAgent.h" |
9 #include "core/inspector/protocol/Accessibility.h" | 9 #include "core/inspector/protocol/Accessibility.h" |
10 #include "modules/ModulesExport.h" | 10 #include "modules/ModulesExport.h" |
11 | 11 |
12 namespace blink { | 12 namespace blink { |
13 | 13 |
| 14 class AXObjectCache; |
14 class InspectorDOMAgent; | 15 class InspectorDOMAgent; |
| 16 class LocalFrame; |
15 class Page; | 17 class Page; |
16 | 18 |
| 19 using CacheMap = HeapHashMap<String, Member<AXObjectCache>>; |
| 20 |
17 class MODULES_EXPORT InspectorAccessibilityAgent : public InspectorBaseAgent<pro
tocol::Accessibility::Metainfo> { | 21 class MODULES_EXPORT InspectorAccessibilityAgent : public InspectorBaseAgent<pro
tocol::Accessibility::Metainfo> { |
18 WTF_MAKE_NONCOPYABLE(InspectorAccessibilityAgent); | 22 WTF_MAKE_NONCOPYABLE(InspectorAccessibilityAgent); |
19 public: | 23 public: |
20 InspectorAccessibilityAgent(Page*, InspectorDOMAgent*); | 24 InspectorAccessibilityAgent(Page*, InspectorDOMAgent*); |
21 | 25 |
22 // Base agent methods. | 26 // Base agent methods. |
23 DECLARE_VIRTUAL_TRACE(); | 27 DECLARE_VIRTUAL_TRACE(); |
24 | 28 |
25 // Protocol methods. | 29 // Protocol methods. |
26 void getAXNode(ErrorString*, int nodeId, Maybe<protocol::Accessibility::AXNo
de>* accessibilityNode) override; | 30 void getAXNodeForDOMNode(ErrorString*, int domNodeId, bool fetchAncestors, M
aybe<protocol::Array<protocol::Accessibility::AXNode>>* nodes) override; |
27 | 31 |
28 private: | 32 private: |
| 33 void discardFrontendBindings(); |
| 34 |
29 Member<Page> m_page; | 35 Member<Page> m_page; |
| 36 CacheMap m_frameToAXObjectCacheMap; |
30 Member<InspectorDOMAgent> m_domAgent; | 37 Member<InspectorDOMAgent> m_domAgent; |
31 }; | 38 }; |
32 | 39 |
33 } // namespace blink | 40 } // namespace blink |
34 | 41 |
35 #endif // InspectorAccessibilityAgent_h | 42 #endif // InspectorAccessibilityAgent_h |
OLD | NEW |