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

Side by Side Diff: chrome/browser/ui/ash/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: Move files from c/b/u/views/accessibility to c/b/u/ash/accessibility Created 6 years, 7 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_ASH_ACCESSIBILITY_AX_TREE_SOURCE_VIEWS_H_
6 #define CHROME_BROWSER_UI_ASH_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/ash/accessibility/ax_root_obj_wrapper.h"
13 #include "ui/accessibility/ax_tree_source.h"
14
15 namespace views {
16 class AXAuraObjWrapper;
17 } // namespace views
18
19 // This class exposes the views hierarchy as an accessibility tree permitting
20 // use with other accessibility classes.
21 class AXTreeSourceViews
22 : public ui::AXTreeSource<views::AXAuraObjWrapper*> {
23 public:
24 AXTreeSourceViews();
25 virtual ~AXTreeSourceViews();
26
27 // AXTreeSource implementation.
28 virtual views::AXAuraObjWrapper* GetRoot() const OVERRIDE;
29 virtual views::AXAuraObjWrapper* GetFromId(int32 id) const OVERRIDE;
30 virtual int32 GetId(views::AXAuraObjWrapper* node) const OVERRIDE;
31 virtual void GetChildren(views::AXAuraObjWrapper* node,
32 std::vector<views::AXAuraObjWrapper*>* out_children) const OVERRIDE;
33 virtual views::AXAuraObjWrapper* GetParent(
34 views::AXAuraObjWrapper* node) const OVERRIDE;
35 virtual bool IsValid(views::AXAuraObjWrapper* node) const OVERRIDE;
36 virtual bool IsEqual(views::AXAuraObjWrapper* node1,
37 views::AXAuraObjWrapper* node2) const OVERRIDE;
38 virtual views::AXAuraObjWrapper* GetNull() const OVERRIDE;
39 virtual void SerializeNode(
40 views::AXAuraObjWrapper* node, ui::AXNodeData* out_data) const OVERRIDE;
41
42 // Useful for debugging.
43 std::string ToString(views::AXAuraObjWrapper* root, std::string prefix);
44
45 private:
46 scoped_ptr<AXRootObjWrapper> root_;
47
48 DISALLOW_COPY_AND_ASSIGN(AXTreeSourceViews);
49 };
50
51 #endif // CHROME_BROWSER_UI_ASH_ACCESSIBILITY_AX_TREE_SOURCE_VIEWS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698