Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(295)

Unified Diff: chrome/browser/chromeos/arc/accessibility_helper/ax_tree_source_arc.h

Issue 2640123004: Initial support for native accessibility in ARC (Closed)
Patch Set: address feedback Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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"
+#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.
+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_

Powered by Google App Engine
This is Rietveld 408576698