[Extensions] Make extension message bubble factory platform-abstract
[chromium-blink-merge.git] / chrome / browser / ui / aura / accessibility / ax_tree_source_aura.h
blobf5ac5be09872a07080dcb8cde4bdd1b3be188824
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_AURA_ACCESSIBILITY_AX_TREE_SOURCE_AURA_H_
6 #define CHROME_BROWSER_UI_AURA_ACCESSIBILITY_AX_TREE_SOURCE_AURA_H_
8 #include <map>
10 #include "base/basictypes.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "chrome/browser/ui/aura/accessibility/ax_root_obj_wrapper.h"
13 #include "ui/accessibility/ax_tree_source.h"
15 namespace views {
16 class AXAuraObjWrapper;
17 } // namespace views
19 // This class exposes the views hierarchy as an accessibility tree permitting
20 // use with other accessibility classes.
21 class AXTreeSourceAura : public ui::AXTreeSource<views::AXAuraObjWrapper*> {
22 public:
23 AXTreeSourceAura();
24 ~AXTreeSourceAura() override;
26 // A set of actions invoked on an Aura view.
27 void DoDefault(int32 id);
28 void Focus(int32 id);
29 void MakeVisible(int32 id);
30 void SetSelection(int32 id, int32 start, int32 end);
32 // AXTreeSource implementation.
33 views::AXAuraObjWrapper* GetRoot() const override;
34 views::AXAuraObjWrapper* GetFromId(int32 id) const override;
35 int32 GetId(views::AXAuraObjWrapper* node) const override;
36 void GetChildren(
37 views::AXAuraObjWrapper* node,
38 std::vector<views::AXAuraObjWrapper*>* out_children) const override;
39 views::AXAuraObjWrapper* GetParent(
40 views::AXAuraObjWrapper* node) const override;
41 bool IsValid(views::AXAuraObjWrapper* node) const override;
42 bool IsEqual(views::AXAuraObjWrapper* node1,
43 views::AXAuraObjWrapper* node2) const override;
44 views::AXAuraObjWrapper* GetNull() const override;
45 void SerializeNode(views::AXAuraObjWrapper* node,
46 ui::AXNodeData* out_data) const override;
48 // Useful for debugging.
49 std::string ToString(views::AXAuraObjWrapper* root, std::string prefix);
51 private:
52 scoped_ptr<AXRootObjWrapper> root_;
54 DISALLOW_COPY_AND_ASSIGN(AXTreeSourceAura);
57 #endif // CHROME_BROWSER_UI_AURA_ACCESSIBILITY_AX_TREE_SOURCE_AURA_H_