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

Side by Side Diff: ui/accessibility/ax_host_delegate.h

Issue 2700103004: Initial support for accessibility actions on ARC. (Closed)
Patch Set: Use desktop tree id. Created 3 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
« no previous file with comments | « ui/accessibility/BUILD.gn ('k') | ui/accessibility/ax_host_delegate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2017 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 UI_ACCESSIBILITY_AX_HOST_DELEGATE_H_
6 #define UI_ACCESSIBILITY_AX_HOST_DELEGATE_H_
7
8 #include "ui/accessibility/ax_action_data.h"
9
10 namespace ui {
11
12 // Classes that host an accessibility tree in the browser process that also wish
13 // to become visible to accessibility clients (e.g. for relaying targets to
14 // source accessibility trees), can subclass this delegate.
15 //
16 // Subclasses can use |tree_id| when annotating their |AXNodeData| for clients
17 // to respond with the appropriate target node id.
18 class AX_EXPORT AXHostDelegate {
19 public:
20 virtual ~AXHostDelegate();
21
22 // Handle an action from an accessibility client.
23 virtual void PerformAction(const ui::AXActionData& data) = 0;
24
25 protected:
26 // A delegate with an automatically assigned tree id.
27 AXHostDelegate();
28
29 // A delegate with an explicit tree id. The caller is responsible for ensuring
30 // the uniqueness of the id.
31 explicit AXHostDelegate(int32_t tree_id);
32
33 // A tree id appropriate for annotating events sent to an accessibility
34 // client.
35 int32_t tree_id() { return tree_id_; }
36
37 private:
38 // Register or unregister this class with |AXTreeIDRegistry|.
39 void UpdateActiveState(bool active);
40
41 int32_t tree_id_;
42 };
43
44 } // namespace ui
45
46 #endif // UI_ACCESSIBILITY_AX_HOST_DELEGATE_H_
OLDNEW
« no previous file with comments | « ui/accessibility/BUILD.gn ('k') | ui/accessibility/ax_host_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698