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

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

Issue 2700103004: Initial support for accessibility actions on ARC. (Closed)
Patch Set: Rename cleanup. Created 3 years, 10 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
(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 that also wish to
dmazzoni 2017/02/20 04:50:46 "in the browser" could be interpreted to mean that
David Tseng 2017/02/21 19:09:05 That's not quite what it meant to me. Browser proc
13 // become visible to accessibility clients (e.g. for relaying targets to source
14 // 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 AXHostDelegate();
21 virtual ~AXHostDelegate();
22
23 // Handle an action from an accessibility client.
24 virtual void PerformAction(const ui::AXActionData& data) = 0;
25
26 protected:
27 // A tree id appropriate for annotating events sent to an accessibility
28 // client.
29 int32_t tree_id() { return tree_id_; }
30
31 private:
32 // Register or unregister this class with |AXTreeIDRegistry|.
33 void UpdateActiveState(bool active);
34
35 int32_t tree_id_;
36 };
37
38 } // namespace ui
39
40 #endif // UI_ACCESSIBILITY_AX_HOST_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698