| OLD | NEW |
| (Empty) |
| 1 // Copyright 2016 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_ACTION_DATA_H_ | |
| 6 #define UI_ACCESSIBILITY_AX_ACTION_DATA_H_ | |
| 7 | |
| 8 #include "base/strings/string16.h" | |
| 9 #include "ui/accessibility/ax_enums.h" | |
| 10 #include "ui/accessibility/ax_export.h" | |
| 11 #include "ui/gfx/geometry/rect.h" | |
| 12 | |
| 13 namespace ui { | |
| 14 | |
| 15 // A compact representation of an accessibility action and the arguments | |
| 16 // associated with that action. | |
| 17 struct AX_EXPORT AXActionData { | |
| 18 AXActionData(); | |
| 19 AXActionData(const AXActionData& other); | |
| 20 virtual ~AXActionData(); | |
| 21 | |
| 22 // Return a string representation of this data, for debugging. | |
| 23 virtual std::string ToString() const; | |
| 24 | |
| 25 // This is a simple serializable struct. All member variables should be | |
| 26 // public and copyable. | |
| 27 | |
| 28 // See the AXAction enums in ax_enums.idl for explanations of which | |
| 29 // parameters apply. | |
| 30 | |
| 31 // The action to take. | |
| 32 AXAction action; | |
| 33 | |
| 34 // The ID of the node that this action should be performed on. | |
| 35 int target_node_id; | |
| 36 | |
| 37 // Use enums from AXActionFlags | |
| 38 int flags; | |
| 39 | |
| 40 // For an action that creates a selection, the selection anchor and focus | |
| 41 // (see ax_tree_data.h for definitions). | |
| 42 int anchor_node_id; | |
| 43 int anchor_offset; | |
| 44 | |
| 45 int focus_node_id; | |
| 46 int focus_offset; | |
| 47 | |
| 48 // The target rect for the action. | |
| 49 gfx::Rect target_rect; | |
| 50 | |
| 51 // The target point for the action. | |
| 52 gfx::Point target_point; | |
| 53 | |
| 54 // The new value for a node, for the SET_VALUE action. | |
| 55 base::string16 value; | |
| 56 }; | |
| 57 | |
| 58 } // namespace ui | |
| 59 | |
| 60 #endif // UI_ACCESSIBILITY_AX_ACTION_DATA_H_ | |
| OLD | NEW |