1 // Copyright 2018 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_EVENT_H_
6 #define UI_ACCESSIBILITY_AX_EVENT_H_
7 
8 #include <string>
9 
10 #include "ui/accessibility/ax_enums.mojom-forward.h"
11 #include "ui/accessibility/ax_export.h"
12 
13 namespace ui {
14 
15 struct AX_EXPORT AXEvent {
16   AXEvent();
17   virtual ~AXEvent();
18 
19   // The type of event.
20   ax::mojom::Event event_type;
21 
22   // The id of the node in the AXTree that the event should be fired on.
23   int id = -1;
24 
25   // The source of the event.
26   ax::mojom::EventFrom event_from;
27 
28   // The action request ID that was passed in if this event was fired in
29   // direct response to a ax::mojom::Action.
30   int action_request_id = -1;
31 
32   // Return a string representation of this data, for debugging.
33   std::string ToString() const;
34 };
35 
36 }  // namespace ui
37 
38 #endif  // UI_ACCESSIBILITY_AX_EVENT_H_
39