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

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

Issue 1003283002: Enable chrome.automation.getDesktop on all aura platforms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Actions. Created 5 years, 9 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_ASH_ACCESSIBILITY_AX_TREE_SOURCE_ASH_H_ 5 #ifndef CHROME_BROWSER_UI_AURA_ACCESSIBILITY_AX_TREE_SOURCE_AURA_H_
6 #define CHROME_BROWSER_UI_ASH_ACCESSIBILITY_AX_TREE_SOURCE_ASH_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/ash/accessibility/ax_root_obj_wrapper.h" 12 #include "chrome/browser/ui/aura/accessibility/ax_root_obj_wrapper.h"
13 #include "ui/accessibility/ax_tree_source.h" 13 #include "ui/accessibility/ax_tree_source.h"
14 14
15 namespace views { 15 namespace views {
16 class AXAuraObjWrapper; 16 class AXAuraObjWrapper;
17 } // namespace views 17 } // namespace views
18 18
19 // This class exposes the views hierarchy as an accessibility tree permitting 19 // This class exposes the views hierarchy as an accessibility tree permitting
20 // use with other accessibility classes. 20 // use with other accessibility classes.
21 class AXTreeSourceAsh 21 class AXTreeSourceAura : public ui::AXTreeSource<views::AXAuraObjWrapper*> {
22 : public ui::AXTreeSource<views::AXAuraObjWrapper*> {
23 public: 22 public:
24 AXTreeSourceAsh(); 23 AXTreeSourceAura();
25 ~AXTreeSourceAsh() override; 24 ~AXTreeSourceAura() override;
26 25
27 // A set of actions invoked on an Aura view. 26 // A set of actions invoked on an Aura view.
28 void DoDefault(int32 id); 27 void DoDefault(int32 id);
29 void Focus(int32 id); 28 void Focus(int32 id);
30 void MakeVisible(int32 id); 29 void MakeVisible(int32 id);
31 void SetSelection(int32 id, int32 start, int32 end); 30 void SetSelection(int32 id, int32 start, int32 end);
32 31
33 // AXTreeSource implementation. 32 // AXTreeSource implementation.
34 views::AXAuraObjWrapper* GetRoot() const override; 33 views::AXAuraObjWrapper* GetRoot() const override;
35 views::AXAuraObjWrapper* GetFromId(int32 id) const override; 34 views::AXAuraObjWrapper* GetFromId(int32 id) const override;
36 int32 GetId(views::AXAuraObjWrapper* node) const override; 35 int32 GetId(views::AXAuraObjWrapper* node) const override;
37 void GetChildren( 36 void GetChildren(
38 views::AXAuraObjWrapper* node, 37 views::AXAuraObjWrapper* node,
39 std::vector<views::AXAuraObjWrapper*>* out_children) const override; 38 std::vector<views::AXAuraObjWrapper*>* out_children) const override;
40 views::AXAuraObjWrapper* GetParent( 39 views::AXAuraObjWrapper* GetParent(
41 views::AXAuraObjWrapper* node) const override; 40 views::AXAuraObjWrapper* node) const override;
42 bool IsValid(views::AXAuraObjWrapper* node) const override; 41 bool IsValid(views::AXAuraObjWrapper* node) const override;
43 bool IsEqual(views::AXAuraObjWrapper* node1, 42 bool IsEqual(views::AXAuraObjWrapper* node1,
44 views::AXAuraObjWrapper* node2) const override; 43 views::AXAuraObjWrapper* node2) const override;
45 views::AXAuraObjWrapper* GetNull() const override; 44 views::AXAuraObjWrapper* GetNull() const override;
46 void SerializeNode(views::AXAuraObjWrapper* node, 45 void SerializeNode(views::AXAuraObjWrapper* node,
47 ui::AXNodeData* out_data) const override; 46 ui::AXNodeData* out_data) const override;
48 47
49 // Useful for debugging. 48 // Useful for debugging.
50 std::string ToString(views::AXAuraObjWrapper* root, std::string prefix); 49 std::string ToString(views::AXAuraObjWrapper* root, std::string prefix);
51 50
52 private: 51 private:
53 scoped_ptr<AXRootObjWrapper> root_; 52 scoped_ptr<AXRootObjWrapper> root_;
54 53
55 DISALLOW_COPY_AND_ASSIGN(AXTreeSourceAsh); 54 DISALLOW_COPY_AND_ASSIGN(AXTreeSourceAura);
56 }; 55 };
57 56
58 #endif // CHROME_BROWSER_UI_ASH_ACCESSIBILITY_AX_TREE_SOURCE_ASH_H_ 57 #endif // CHROME_BROWSER_UI_AURA_ACCESSIBILITY_AX_TREE_SOURCE_AURA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698