Chromium Code Reviews| 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 AXObject; | 14 class AXObject; |
| 15 class AXObjectCacheImpl; | |
| 15 class InspectorDOMAgent; | 16 class InspectorDOMAgent; |
| 16 class Page; | 17 class Page; |
| 17 | 18 |
| 19 using protocol::Accessibility::AXNode; | |
|
dgozman
2016/11/08 16:38:41
Move usings to private section (per style guide).
aboxhall
2016/11/08 18:02:18
I originally had that, but it doesn't compile:
err
| |
| 20 using protocol::Accessibility::AXNodeId; | |
| 21 | |
| 18 class MODULES_EXPORT InspectorAccessibilityAgent | 22 class MODULES_EXPORT InspectorAccessibilityAgent |
| 19 : public InspectorBaseAgent<protocol::Accessibility::Metainfo> { | 23 : public InspectorBaseAgent<protocol::Accessibility::Metainfo> { |
| 20 WTF_MAKE_NONCOPYABLE(InspectorAccessibilityAgent); | 24 WTF_MAKE_NONCOPYABLE(InspectorAccessibilityAgent); |
| 21 | 25 |
| 22 public: | 26 public: |
| 23 InspectorAccessibilityAgent(Page*, InspectorDOMAgent*); | 27 InspectorAccessibilityAgent(Page*, InspectorDOMAgent*); |
| 24 | 28 |
| 25 // Base agent methods. | 29 // Base agent methods. |
| 26 DECLARE_VIRTUAL_TRACE(); | 30 DECLARE_VIRTUAL_TRACE(); |
| 27 | 31 |
| 28 // Protocol methods. | 32 // Protocol methods. |
| 29 Response getAXNodeChain( | 33 Response getPartialAXTree( |
| 30 int domNodeId, | 34 int domNodeId, |
| 31 bool fetchAncestors, | 35 Maybe<bool> fetchRelatives, |
| 32 std::unique_ptr<protocol::Array<protocol::Accessibility::AXNode>>*) | 36 std::unique_ptr<protocol::Array<protocol::Accessibility::AXNode>>*) |
| 33 override; | 37 override; |
| 34 | 38 |
| 35 private: | 39 private: |
| 36 Member<Page> m_page; | 40 Member<Page> m_page; |
|
dgozman
2016/11/08 16:38:41
Fields should be listed after methods.
aboxhall
2016/11/08 18:02:18
Done.
| |
| 37 Member<InspectorDOMAgent> m_domAgent; | 41 Member<InspectorDOMAgent> m_domAgent; |
| 38 | 42 |
| 39 std::unique_ptr<protocol::Accessibility::AXNode> buildObjectForIgnoredNode( | 43 std::unique_ptr<AXNode> buildObjectForIgnoredNode( |
| 40 Node* domNode, | 44 Node* domNode, |
| 41 AXObject*) const; | 45 AXObject*, |
| 42 std::unique_ptr<protocol::Accessibility::AXNode> buildProtocolAXObject( | 46 bool fetchRelatives, |
| 43 AXObject&) const; | 47 std::unique_ptr<protocol::Array<AXNode>>& nodes, |
| 44 void fillCoreProperties(AXObject&, protocol::Accessibility::AXNode&) const; | 48 AXObjectCacheImpl&) const; |
| 49 void populateDOMNodeRelatives(Node& inspectedDOMNode, | |
| 50 AXNode&, | |
| 51 std::unique_ptr<protocol::Array<AXNode>>& nodes, | |
| 52 AXObjectCacheImpl&) const; | |
| 53 void findDOMNodeChildren(std::unique_ptr<protocol::Array<AXNodeId>>& childIds, | |
| 54 Node& parentNode, | |
| 55 Node& inspectedDOMNode, | |
| 56 std::unique_ptr<protocol::Array<AXNode>>& nodes, | |
| 57 AXObjectCacheImpl&) const; | |
| 58 std::unique_ptr<AXNode> buildProtocolAXObject( | |
| 59 AXObject&, | |
| 60 AXObject* inspectedAXObject, | |
| 61 bool fetchRelatives, | |
| 62 std::unique_ptr<protocol::Array<AXNode>>& nodes, | |
| 63 AXObjectCacheImpl&) const; | |
| 64 void fillCoreProperties(AXObject&, | |
| 65 AXObject* inspectedAXObject, | |
| 66 bool fetchRelatives, | |
| 67 AXNode&, | |
| 68 std::unique_ptr<protocol::Array<AXNode>>& nodes, | |
| 69 AXObjectCacheImpl&) const; | |
| 70 void addAncestors(AXObject& firstAncestor, | |
| 71 AXObject* inspectedAXObject, | |
| 72 std::unique_ptr<protocol::Array<AXNode>>& nodes, | |
| 73 AXObjectCacheImpl&) const; | |
| 74 void populateRelatives(AXObject&, | |
| 75 AXObject* inspectedAXObject, | |
| 76 AXNode&, | |
| 77 std::unique_ptr<protocol::Array<AXNode>>& nodes, | |
| 78 AXObjectCacheImpl&) const; | |
| 79 void addSiblingsOfIgnored( | |
| 80 std::unique_ptr<protocol::Array<AXNodeId>>& childIds, | |
| 81 AXObject& parentAXObject, | |
| 82 AXObject* inspectedAXObject, | |
| 83 std::unique_ptr<protocol::Array<AXNode>>& nodes, | |
| 84 AXObjectCacheImpl&) const; | |
| 85 void addChild(std::unique_ptr<protocol::Array<AXNodeId>>& childIds, | |
| 86 AXObject& childAXObject, | |
| 87 AXObject* inspectedAXObject, | |
| 88 std::unique_ptr<protocol::Array<AXNode>>& nodes, | |
| 89 AXObjectCacheImpl&) const; | |
| 90 void addChildren(AXObject&, | |
| 91 AXObject* inspectedAXObject, | |
| 92 std::unique_ptr<protocol::Array<AXNodeId>>& childIds, | |
| 93 std::unique_ptr<protocol::Array<AXNode>>& nodes, | |
| 94 AXObjectCacheImpl&) const; | |
| 45 }; | 95 }; |
| 46 | 96 |
| 47 } // namespace blink | 97 } // namespace blink |
| 48 | 98 |
| 49 #endif // InspectorAccessibilityAgent_h | 99 #endif // InspectorAccessibilityAgent_h |
| OLD | NEW |