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

Side by Side Diff: chrome/browser/ui/views/accessibility/ax_tree_source_views.h

Issue 246433012: Extend AXTreeSourceViews to handle aura::Window and views::Widget. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: With tests. Created 6 years, 8 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 | Annotate | Revision Log
OLDNEW
(Empty)
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.
4
5 #ifndef CHROME_BROWSER_UI_VIEWS_ACCESSIBILITY_AX_TREE_SOURCE_VIEWS_H_
6 #define CHROME_BROWSER_UI_VIEWS_ACCESSIBILITY_AX_TREE_SOURCE_VIEWS_H_
7
8 #include <map>
9
10 #include "base/basictypes.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "chrome/browser/ui/views/accessibility/ax_root_obj_wrapper.h"
13 #include "ui/accessibility/ax_tree_source.h"
14 #include "ui/views/views_export.h"
15
16 namespace views {
17 class AXAuraObjWrapper;
18
19 // This class exposes the views hierarchy as an accessibility tree permitting
20 // use with other accessibility classes.
21 class VIEWS_EXPORT AXTreeSourceViews
22 : public ui::AXTreeSource<AXAuraObjWrapper*> {
23 public:
24 AXTreeSourceViews();
25 virtual ~AXTreeSourceViews();
26
27 // AXTreeSource implementation.
28 virtual AXAuraObjWrapper* GetRoot() const OVERRIDE;
29 virtual AXAuraObjWrapper* GetFromId(int32 id) const OVERRIDE;
30 virtual int32 GetId(AXAuraObjWrapper* node) const OVERRIDE;
31 virtual void GetChildren(AXAuraObjWrapper* node,
32 std::vector<AXAuraObjWrapper*>* out_children) const OVERRIDE;
33 virtual AXAuraObjWrapper* GetParent(AXAuraObjWrapper* node) const OVERRIDE;
34 virtual bool IsValid(AXAuraObjWrapper* node) const OVERRIDE;
35 virtual bool IsEqual(AXAuraObjWrapper* node1,
36 AXAuraObjWrapper* node2) const OVERRIDE;
37 virtual AXAuraObjWrapper* GetNull() const OVERRIDE;
38 virtual void SerializeNode(
39 AXAuraObjWrapper* node, ui::AXNodeData* out_data) const OVERRIDE;
40
41 // Useful for debugging.
42 std::string ToString(AXAuraObjWrapper* root, std::string prefix);
43
44 private:
45 scoped_ptr<views::AXRootObjWrapper> root_;
46 };
47
48 } // namespace views
49
50 #endif // CHROME_BROWSER_UI_VIEWS_ACCESSIBILITY_AX_TREE_SOURCE_VIEWS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698