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

Unified Diff: chrome/common/extensions/api/automation.idl

Issue 1231603009: Re-land: Reimplement automation API on top of C++-backed AXTree. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix nested event sending in AutomationManagerAura Created 5 years, 5 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 | « chrome/chrome_browser_extensions.gypi ('k') | chrome/common/extensions/api/automation_internal.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/api/automation.idl
diff --git a/chrome/common/extensions/api/automation.idl b/chrome/common/extensions/api/automation.idl
index 51cdfe71b83b41dcebb9adbf9a76aea8055a0d21..b49c3a5e179c58bd70ee76efc89f179bfb0eda68 100644
--- a/chrome/common/extensions/api/automation.idl
+++ b/chrome/common/extensions/api/automation.idl
@@ -318,8 +318,6 @@
// The role of this node.
automation.RoleType role;
- // TODO(aboxhall): expose states as mixins instead
-
// The $(ref:automation.StateType)s describing this node.
object state;
@@ -370,96 +368,21 @@
// name, via the $(ref:automation.AutomationNode.name) attribute.
AutomationNode[] labelledBy;
- // The nodes, if any, which are to be considered children of this node but
- // are not children in the DOM tree.
- AutomationNode[] owns;
-
- // TODO(aboxhall): Make this private?
-
- // A collection of this node's other attributes.
- object? attributes;
-
- // The index of this node in its parent node's list of children. If this is
- // the root node, this will be undefined.
- long? indexInParent;
-
- AutomationNode[] children;
- AutomationNode parent;
- AutomationNode firstChild;
- AutomationNode lastChild;
- AutomationNode previousSibling;
- AutomationNode nextSibling;
-
- // Does the default action based on this node's role. This is generally
- // the same action that would result from clicking the node such as
- // expanding a treeitem, toggling a checkbox, selecting a radiobutton,
- // or activating a button.
- static void doDefault();
-
- // Places focus on this node.
- static void focus();
-
- // Scrolls this node to make it visible.
- static void makeVisible();
-
- // Sets selection within a text field.
- static void setSelection(long startIndex, long endIndex);
-
- // Shows the context menu resulting from a right click on this node.
- static void showContextMenu();
-
- // Adds a listener for the given event type and event phase.
- static void addEventListener(
- EventType eventType, AutomationListener listener, boolean capture);
-
- // Removes a listener for the given event type and event phase.
- static void removeEventListener(
- EventType eventType, AutomationListener listener, boolean capture);
-
- // Gets the first node in this node's subtree which matches the given CSS
- // selector and is within the same DOM context.
- //
- // If this node doesn't correspond directly with an HTML node in the DOM,
- // querySelector will be run on this node's nearest HTML node ancestor. Note
- // that this may result in the query returning a node which is not a
- // descendant of this node.
- //
- // If the selector matches a node which doesn't directly correspond to an
- // automation node (for example an element within an ARIA widget, where the
- // ARIA widget forms one node of the automation tree, or an element which
- // is hidden from accessibility via hiding it using CSS or using
- // aria-hidden), this will return the nearest ancestor which does correspond
- // to an automation node.
- static void domQuerySelector(DOMString selector, QueryCallback callback);
-
- // Finds the first AutomationNode in this node's subtree which matches the
- // given search parameters.
- static AutomationNode find(FindParams params);
-
- // Finds all the AutomationNodes in this node's subtree which matches the
- // given search parameters.
- static AutomationNode[] findAll(FindParams params);
-
- // Returns whether this node matches the given $(ref:automation.FindParams).
- static boolean matches(FindParams params);
- };
-
- dictionary ActiveDescendantMixin {
// The node referred to by <code>aria-activedescendant</code>, where
// applicable
AutomationNode activedescendant;
- };
- // Attributes which are mixed in to an AutomationNode if it is a link.
- dictionary LinkMixins {
- // TODO(aboxhall): Add visited state
+ //
+ // Link attributes.
+ //
// The URL that this link will navigate to.
DOMString url;
- };
- // Attributes which are mixed in to an AutomationNode if it is a document.
- dictionary DocumentMixins {
+ //
+ // Document attributes.
+ //
+
// The URL of this document.
DOMString docUrl;
@@ -471,23 +394,22 @@
// The proportion (out of 1.0) that this doc has completed loading.
double docLoadingProgress;
- };
- // TODO(aboxhall): document ScrollableMixins (e.g. what is scrollXMin? is it
- // ever not 0?)
+ //
+ // Scrollable container attributes.
+ //
- // Attributes which are mixed in to an AutomationNode if it is scrollable.
- dictionary ScrollableMixins {
long scrollX;
long scrollXMin;
long scrollXMax;
long scrollY;
long scrollYMin;
long scrollYMax;
- };
- // Attributes which are mixed in to an AutomationNode if it is editable text.
- dictionary EditableTextMixins {
+ //
+ // Editable text field attributes.
+ //
+
// The character index of the start of the selection within this editable
// text element; -1 if no selection.
long textSelStart;
@@ -498,10 +420,11 @@
// The input type, like email or number.
DOMString textInputType;
- };
- // Attributes which are mixed in to an AutomationNode if it is a range.
- dictionary RangeMixins {
+ //
+ // Range attributes.
+ //
+
// The current value for this range.
double valueForRange;
@@ -510,21 +433,21 @@
// The maximum possible value for this range.
double maxValueForRange;
- };
- // TODO(aboxhall): live region mixins.
+ //
+ // Table attributes.
+ //
- // Attributes which are mixed in to an AutomationNode if it is a table.
- dictionary TableMixins {
// The number of rows in this table.
long tableRowCount;
// The number of columns in this table.
long tableColumnCount;
- };
- // Attributes which are mixed in to an AutomationNode if it is a table cell.
- dictionary TableCellMixins {
+ //
+ // Table cell attributes.
+ //
+
// The zero-based index of the column that this cell is in.
long tableCellColumnIndex;
@@ -536,6 +459,75 @@
// The number of rows that this cell spans (default is 1).
long tableCellRowSpan;
+
+ //
+ // Walking the tree.
+ //
+
+ AutomationNode[] children;
+ AutomationNode parent;
+ AutomationNode firstChild;
+ AutomationNode lastChild;
+ AutomationNode previousSibling;
+ AutomationNode nextSibling;
+
+ // The index of this node in its parent node's list of children. If this is
+ // the root node, this will be undefined.
+ long? indexInParent;
+
+ //
+ // Actions.
+ //
+
+ // Does the default action based on this node's role. This is generally
+ // the same action that would result from clicking the node such as
+ // expanding a treeitem, toggling a checkbox, selecting a radiobutton,
+ // or activating a button.
+ static void doDefault();
+
+ // Places focus on this node.
+ static void focus();
+
+ // Scrolls this node to make it visible.
+ static void makeVisible();
+
+ // Sets selection within a text field.
+ static void setSelection(long startIndex, long endIndex);
+
+ // Adds a listener for the given event type and event phase.
+ static void addEventListener(
+ EventType eventType, AutomationListener listener, boolean capture);
+
+ // Removes a listener for the given event type and event phase.
+ static void removeEventListener(
+ EventType eventType, AutomationListener listener, boolean capture);
+
+ // Gets the first node in this node's subtree which matches the given CSS
+ // selector and is within the same DOM context.
+ //
+ // If this node doesn't correspond directly with an HTML node in the DOM,
+ // querySelector will be run on this node's nearest HTML node ancestor. Note
+ // that this may result in the query returning a node which is not a
+ // descendant of this node.
+ //
+ // If the selector matches a node which doesn't directly correspond to an
+ // automation node (for example an element within an ARIA widget, where the
+ // ARIA widget forms one node of the automation tree, or an element which
+ // is hidden from accessibility via hiding it using CSS or using
+ // aria-hidden), this will return the nearest ancestor which does correspond
+ // to an automation node.
+ static void domQuerySelector(DOMString selector, QueryCallback callback);
+
+ // Finds the first AutomationNode in this node's subtree which matches the
+ // given search parameters.
+ static AutomationNode find(FindParams params);
+
+ // Finds all the AutomationNodes in this node's subtree which matches the
+ // given search parameters.
+ static AutomationNode[] findAll(FindParams params);
+
+ // Returns whether this node matches the given $(ref:automation.FindParams).
+ static boolean matches(FindParams params);
};
// Called when the <code>AutomationNode</code> for the page is available.
« no previous file with comments | « chrome/chrome_browser_extensions.gypi ('k') | chrome/common/extensions/api/automation_internal.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698