Chromium Code Reviews| Index: chrome/browser/chromeos/arc/accessibility_helper/ax_tree_source_arc.h |
| diff --git a/chrome/browser/chromeos/arc/accessibility_helper/ax_tree_source_arc.h b/chrome/browser/chromeos/arc/accessibility_helper/ax_tree_source_arc.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..aad64faca323325a50944772f416dc3257b0743f |
| --- /dev/null |
| +++ b/chrome/browser/chromeos/arc/accessibility_helper/ax_tree_source_arc.h |
| @@ -0,0 +1,43 @@ |
| +// Copyright 2017 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_CHROMEOS_ARC_ACCESSIBILITY_HELPER_AX_TREE_SOURCE_ARC_H_ |
| +#define CHROME_BROWSER_CHROMEOS_ARC_ACCESSIBILITY_HELPER_AX_TREE_SOURCE_ARC_H_ |
| + |
| +#include "components/exo/ax_tree_source_surface.h" |
|
yawano
2017/01/20 07:47:49
Is this file already landed? I've quickly checked
David Tseng
2017/01/20 23:00:56
Nope not yet. Added!
|
| +#include "components/exo/wm_helper.h" |
| +#include "ui/accessibility/ax_node.h" |
| +#include "ui/accessibility/ax_node_data.h" |
| +#include "ui/accessibility/ax_tree_data.h" |
| + |
| +namespace arc { |
| + |
| +// This class represents the accessibility tree from the focused ARC window. |
|
dmazzoni
2017/01/19 19:48:16
Just curious, why "the focused" ARC window? Could
David Tseng
2017/01/20 23:00:56
I'm thinking we can reuse the same source tree for
|
| +class AXTreeSourceArc : public exo::AXTreeSourceSurface, |
| + public exo::WMHelper::FocusObserver { |
| + public: |
| + // AXTreeSource overrides. |
| + bool GetTreeData(ui::AXTreeData* data) const override; |
| + ui::AXNode* GetRoot() const override; |
| + ui::AXNode* GetFromId(int32_t id) const override; |
| + int32_t GetId(ui::AXNode* node) const override; |
| + void GetChildren(ui::AXNode* node, |
| + std::vector<ui::AXNode*>* out_children) const override; |
| + ui::AXNode* GetParent(ui::AXNode* node) const override; |
| + bool IsValid(ui::AXNode* node) const override; |
| + bool IsEqual(ui::AXNode* node1, ui::AXNode* node2) const override; |
| + ui::AXNode* GetNull() const override; |
| + void SerializeNode(ui::AXNode* node, ui::AXNodeData* out_data) const override; |
| + |
| + protected: |
| + void Reset() override; |
| + |
| + // exo::WMHelper::FocusObserver overrides. |
| + void OnWindowFocused(aura::Window* gained_focus, |
| + aura::Window* lost_focus) override; |
| +}; |
| + |
| +} // namespace arc |
| + |
| +#endif // CHROME_BROWSER_CHROMEOS_ARC_ACCESSIBILITY_HELPER_AX_TREE_SOURCE_ARC_H_ |