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

Unified Diff: ui/accessibility/ax_action_data.h

Issue 2426193003: Re-land: Create AXAction and AXActionData as a way to simplify accessibility actions (Closed)
Patch Set: Rebase Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/accessibility/PRESUBMIT.py ('k') | ui/accessibility/ax_action_data.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/accessibility/ax_action_data.h
diff --git a/ui/accessibility/ax_action_data.h b/ui/accessibility/ax_action_data.h
new file mode 100644
index 0000000000000000000000000000000000000000..4c0af535749aac9163dd87fc87832cba42cf9dc7
--- /dev/null
+++ b/ui/accessibility/ax_action_data.h
@@ -0,0 +1,60 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_ACCESSIBILITY_AX_ACTION_DATA_H_
+#define UI_ACCESSIBILITY_AX_ACTION_DATA_H_
+
+#include "base/strings/string16.h"
+#include "ui/accessibility/ax_enums.h"
+#include "ui/accessibility/ax_export.h"
+#include "ui/gfx/geometry/rect.h"
+
+namespace ui {
+
+// A compact representation of an accessibility action and the arguments
+// associated with that action.
+struct AX_EXPORT AXActionData {
+ AXActionData();
+ AXActionData(const AXActionData& other);
+ virtual ~AXActionData();
+
+ // Return a string representation of this data, for debugging.
+ virtual std::string ToString() const;
+
+ // This is a simple serializable struct. All member variables should be
+ // public and copyable.
+
+ // See the AXAction enums in ax_enums.idl for explanations of which
+ // parameters apply.
+
+ // The action to take.
+ AXAction action;
+
+ // The ID of the node that this action should be performed on.
+ int target_node_id;
+
+ // Use enums from AXActionFlags
+ int flags;
+
+ // For an action that creates a selection, the selection anchor and focus
+ // (see ax_tree_data.h for definitions).
+ int anchor_node_id;
+ int anchor_offset;
+
+ int focus_node_id;
+ int focus_offset;
+
+ // The target rect for the action.
+ gfx::Rect target_rect;
+
+ // The target point for the action.
+ gfx::Point target_point;
+
+ // The new value for a node, for the SET_VALUE action.
+ base::string16 value;
+};
+
+} // namespace ui
+
+#endif // UI_ACCESSIBILITY_AX_ACTION_DATA_H_
« no previous file with comments | « ui/accessibility/PRESUBMIT.py ('k') | ui/accessibility/ax_action_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698