| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef UI_ACCESSIBILITY_AX_ACTION_DATA_H_ | 5 #ifndef UI_ACCESSIBILITY_AX_ACTION_DATA_H_ |
| 6 #define UI_ACCESSIBILITY_AX_ACTION_DATA_H_ | 6 #define UI_ACCESSIBILITY_AX_ACTION_DATA_H_ |
| 7 | 7 |
| 8 #include "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
| 9 #include "ui/accessibility/ax_enums.h" | 9 #include "ui/accessibility/ax_enums.h" |
| 10 #include "ui/accessibility/ax_export.h" | 10 #include "ui/accessibility/ax_export.h" |
| 11 #include "ui/gfx/geometry/rect.h" | 11 #include "ui/gfx/geometry/rect.h" |
| 12 | 12 |
| 13 namespace ui { | 13 namespace ui { |
| 14 | 14 |
| 15 // A compact representation of an accessibility action and the arguments | 15 // A compact representation of an accessibility action and the arguments |
| 16 // associated with that action. | 16 // associated with that action. |
| 17 struct AX_EXPORT AXActionData { | 17 struct AX_EXPORT AXActionData { |
| 18 AXActionData(); | 18 AXActionData(); |
| 19 AXActionData(const AXActionData& other); | 19 AXActionData(const AXActionData& other); |
| 20 virtual ~AXActionData(); | 20 virtual ~AXActionData(); |
| 21 | 21 |
| 22 // Add a boolean attribute to this action. |
| 23 void AddBoolAttribute(AXActionBoolAttribute attribute, bool value); |
| 24 bool GetBoolAttribute(AXActionBoolAttribute attr) const; |
| 25 |
| 22 // Return a string representation of this data, for debugging. | 26 // Return a string representation of this data, for debugging. |
| 23 virtual std::string ToString() const; | 27 virtual std::string ToString() const; |
| 24 | 28 |
| 25 // This is a simple serializable struct. All member variables should be | 29 // This is a simple serializable struct. All member variables should be |
| 26 // public and copyable. | 30 // public and copyable. |
| 27 | 31 |
| 28 // See the AXAction enums in ax_enums.idl for explanations of which | 32 // See the AXAction enums in ax_enums.idl for explanations of which |
| 29 // parameters apply. | 33 // parameters apply. |
| 30 | 34 |
| 31 // The action to take. | 35 // The action to take. |
| (...skipping 14 matching lines...) Expand all Loading... |
| 46 int focus_offset; | 50 int focus_offset; |
| 47 | 51 |
| 48 // The target rect for the action. | 52 // The target rect for the action. |
| 49 gfx::Rect target_rect; | 53 gfx::Rect target_rect; |
| 50 | 54 |
| 51 // The target point for the action. | 55 // The target point for the action. |
| 52 gfx::Point target_point; | 56 gfx::Point target_point; |
| 53 | 57 |
| 54 // The new value for a node, for the SET_VALUE action. | 58 // The new value for a node, for the SET_VALUE action. |
| 55 base::string16 value; | 59 base::string16 value; |
| 60 std::vector<std::pair<AXActionBoolAttribute, bool>> bool_attributes; |
| 56 }; | 61 }; |
| 57 | 62 |
| 58 } // namespace ui | 63 } // namespace ui |
| 59 | 64 |
| 60 #endif // UI_ACCESSIBILITY_AX_ACTION_DATA_H_ | 65 #endif // UI_ACCESSIBILITY_AX_ACTION_DATA_H_ |
| OLD | NEW |