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

Side by Side Diff: chrome/browser/ui/aura/accessibility/ax_tree_source_aura.h

Issue 1413423003: Move some AX attrs from AXNodeData to AXTreeData. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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 CHROME_BROWSER_UI_AURA_ACCESSIBILITY_AX_TREE_SOURCE_AURA_H_ 5 #ifndef CHROME_BROWSER_UI_AURA_ACCESSIBILITY_AX_TREE_SOURCE_AURA_H_
6 #define CHROME_BROWSER_UI_AURA_ACCESSIBILITY_AX_TREE_SOURCE_AURA_H_ 6 #define CHROME_BROWSER_UI_AURA_ACCESSIBILITY_AX_TREE_SOURCE_AURA_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "chrome/browser/ui/aura/accessibility/ax_root_obj_wrapper.h" 12 #include "chrome/browser/ui/aura/accessibility/ax_root_obj_wrapper.h"
13 #include "ui/accessibility/ax_tree_data.h"
13 #include "ui/accessibility/ax_tree_source.h" 14 #include "ui/accessibility/ax_tree_source.h"
14 15
15 namespace views { 16 namespace views {
16 class AXAuraObjWrapper; 17 class AXAuraObjWrapper;
17 } // namespace views 18 } // namespace views
18 19
19 // This class exposes the views hierarchy as an accessibility tree permitting 20 // This class exposes the views hierarchy as an accessibility tree permitting
20 // use with other accessibility classes. 21 // use with other accessibility classes.
21 class AXTreeSourceAura 22 class AXTreeSourceAura
22 : public ui::AXTreeSource<views::AXAuraObjWrapper*, ui::AXNodeData> { 23 : public ui::AXTreeSource<views::AXAuraObjWrapper*,
24 ui::AXNodeData,
25 ui::AXTreeData> {
23 public: 26 public:
24 AXTreeSourceAura(); 27 AXTreeSourceAura();
25 ~AXTreeSourceAura() override; 28 ~AXTreeSourceAura() override;
26 29
27 // A set of actions invoked on an Aura view. 30 // A set of actions invoked on an Aura view.
28 void DoDefault(int32 id); 31 void DoDefault(int32 id);
29 void Focus(int32 id); 32 void Focus(int32 id);
30 void MakeVisible(int32 id); 33 void MakeVisible(int32 id);
31 void SetSelection(int32 id, int32 start, int32 end); 34 void SetSelection(int32 id, int32 start, int32 end);
32 void ShowContextMenu(int32 id); 35 void ShowContextMenu(int32 id);
33 36
34 // AXTreeSource implementation. 37 // AXTreeSource implementation.
38 ui::AXTreeData GetTreeData() const override;
35 views::AXAuraObjWrapper* GetRoot() const override; 39 views::AXAuraObjWrapper* GetRoot() const override;
36 views::AXAuraObjWrapper* GetFromId(int32 id) const override; 40 views::AXAuraObjWrapper* GetFromId(int32 id) const override;
37 int32 GetId(views::AXAuraObjWrapper* node) const override; 41 int32 GetId(views::AXAuraObjWrapper* node) const override;
38 void GetChildren( 42 void GetChildren(
39 views::AXAuraObjWrapper* node, 43 views::AXAuraObjWrapper* node,
40 std::vector<views::AXAuraObjWrapper*>* out_children) const override; 44 std::vector<views::AXAuraObjWrapper*>* out_children) const override;
41 views::AXAuraObjWrapper* GetParent( 45 views::AXAuraObjWrapper* GetParent(
42 views::AXAuraObjWrapper* node) const override; 46 views::AXAuraObjWrapper* node) const override;
43 bool IsValid(views::AXAuraObjWrapper* node) const override; 47 bool IsValid(views::AXAuraObjWrapper* node) const override;
44 bool IsEqual(views::AXAuraObjWrapper* node1, 48 bool IsEqual(views::AXAuraObjWrapper* node1,
45 views::AXAuraObjWrapper* node2) const override; 49 views::AXAuraObjWrapper* node2) const override;
46 views::AXAuraObjWrapper* GetNull() const override; 50 views::AXAuraObjWrapper* GetNull() const override;
47 void SerializeNode(views::AXAuraObjWrapper* node, 51 void SerializeNode(views::AXAuraObjWrapper* node,
48 ui::AXNodeData* out_data) const override; 52 ui::AXNodeData* out_data) const override;
49 53
50 // Useful for debugging. 54 // Useful for debugging.
51 std::string ToString(views::AXAuraObjWrapper* root, std::string prefix); 55 std::string ToString(views::AXAuraObjWrapper* root, std::string prefix);
52 56
53 private: 57 private:
54 scoped_ptr<AXRootObjWrapper> root_; 58 scoped_ptr<AXRootObjWrapper> root_;
55 59
56 DISALLOW_COPY_AND_ASSIGN(AXTreeSourceAura); 60 DISALLOW_COPY_AND_ASSIGN(AXTreeSourceAura);
57 }; 61 };
58 62
59 #endif // CHROME_BROWSER_UI_AURA_ACCESSIBILITY_AX_TREE_SOURCE_AURA_H_ 63 #endif // CHROME_BROWSER_UI_AURA_ACCESSIBILITY_AX_TREE_SOURCE_AURA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698