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

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

Issue 1365433002: Add setSelection function to automation API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@nobrailleautostartintests
Patch Set: Fix style and remove console.log Created 5 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
Index: chrome/common/extensions/api/automation.idl
diff --git a/chrome/common/extensions/api/automation.idl b/chrome/common/extensions/api/automation.idl
index b49c3a5e179c58bd70ee76efc89f179bfb0eda68..061bbb4230b2e22646157cbb19950d73667e6179 100644
--- a/chrome/common/extensions/api/automation.idl
+++ b/chrome/common/extensions/api/automation.idl
@@ -312,7 +312,7 @@
// The root node of the tree containing this AutomationNode.
AutomationNode root;
- // Whether this AutomationNode is root node.
+ // Whether this AutomationNode is a root node.
boolean isRootNode;
// The role of this node.
@@ -422,6 +422,19 @@
DOMString textInputType;
//
+ // Tree selection attributes (available on root nodes only)
+ //
+
+ // The anchor node of the tree selection, if any.
+ AutomationNode? anchorObject;
+ // The anchor offset of the tree selection, if any.
+ long? anchorOffset;
+ // The focus node of the tree selection, if any.
+ AutomationNode? focusObject;
+ // The focus offset of the tree selection, if any.
+ long? focusOffset;
+
+ //
// Range attributes.
//
@@ -553,5 +566,19 @@
// Remove a tree change observer.
[nocompile] static void removeTreeChangeObserver(
TreeChangeObserver observer);
+
+ // Sets the selection in a tree. This creates a selection in a single
+ // tree (anchorObject and focusObject must have the same root).
+ // Everything in the tree between the two node/offset pairs gets included
+ // in the selection. The anchor is where the user started the selection,
+ // while the focus is the point at which the selection gets extended
+ // e.g. when dragging with a mouse or using the keyboard. For nodes with
+ // the role staticText, the offset gives the character offset within
+ // the value where the selection starts or ends, respectively.
+ [nocompile] static void setDocumentSelection(
+ [instanceOf=AutomationNode] object anchorObject,
+ long anchorOffset,
+ [instanceOf=AutomationNode] object focusObject,
+ long focusOffset);
not at google - send to devlin 2015/10/05 12:56:02 I'd make this an object with properties "anchorObj
};
};
« no previous file with comments | « chrome/browser/ui/aura/accessibility/automation_manager_aura.cc ('k') | chrome/common/extensions/api/automation_internal.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698