OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 // The <code>chrome.automation</code> API allows developers to access the | 5 // The <code>chrome.automation</code> API allows developers to access the |
6 // automation (accessibility) tree for the browser. The tree resembles the DOM | 6 // automation (accessibility) tree for the browser. The tree resembles the DOM |
7 // tree, but only exposes the <em>semantic</em> structure of a page. It can be | 7 // tree, but only exposes the <em>semantic</em> structure of a page. It can be |
8 // used to programmatically interact with a page by examining names, roles, and | 8 // used to programmatically interact with a page by examining names, roles, and |
9 // states, listening for events, and performing actions on nodes. | 9 // states, listening for events, and performing actions on nodes. |
10 [nocompile] namespace automation { | 10 [nocompile] namespace automation { |
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
436 | 436 |
437 // The nodes, if any, which form a label for this element. Generally, the | 437 // The nodes, if any, which form a label for this element. Generally, the |
438 // text from these elements will also be exposed as the element's accessible | 438 // text from these elements will also be exposed as the element's accessible |
439 // name, via the $(ref:automation.AutomationNode.name) attribute. | 439 // name, via the $(ref:automation.AutomationNode.name) attribute. |
440 AutomationNode[]? labelledBy; | 440 AutomationNode[]? labelledBy; |
441 | 441 |
442 // The node referred to by <code>aria-activedescendant</code>, where | 442 // The node referred to by <code>aria-activedescendant</code>, where |
443 // applicable | 443 // applicable |
444 AutomationNode? activeDescendant; | 444 AutomationNode? activeDescendant; |
445 | 445 |
| 446 // The target of an in-page link. |
| 447 AutomationNode? inPageLinkTarget; |
| 448 |
446 // | 449 // |
447 // Link attributes. | 450 // Link attributes. |
448 // | 451 // |
449 | 452 |
450 // The URL that this link will navigate to. | 453 // The URL that this link will navigate to. |
451 DOMString? url; | 454 DOMString? url; |
452 | 455 |
453 // | 456 // |
454 // Document attributes. | 457 // Document attributes. |
455 // | 458 // |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
752 | 755 |
753 // Called with the <code>AutomationNode</code> that currently has focus. | 756 // Called with the <code>AutomationNode</code> that currently has focus. |
754 callback FocusCallback = void(AutomationNode focusedNode); | 757 callback FocusCallback = void(AutomationNode focusedNode); |
755 | 758 |
756 interface Functions { | 759 interface Functions { |
757 // Get the automation tree for the tab with the given tabId, or the current | 760 // Get the automation tree for the tab with the given tabId, or the current |
758 // tab if no tabID is given, enabling automation if necessary. Returns a | 761 // tab if no tabID is given, enabling automation if necessary. Returns a |
759 // tree with a placeholder root node; listen for the "loadComplete" event to | 762 // tree with a placeholder root node; listen for the "loadComplete" event to |
760 // get a notification that the tree has fully loaded (the previous root node | 763 // get a notification that the tree has fully loaded (the previous root node |
761 // reference will stop working at or before this point). | 764 // reference will stop working at or before this point). |
762 [nocompile] static void getTree(optional long tabId, RootCallback callback); | 765 [nocompile] static void getTree(optional long tabId, |
| 766 optional RootCallback callback); |
763 | 767 |
764 // Get the automation tree for the whole desktop which consists of all on | 768 // Get the automation tree for the whole desktop which consists of all on |
765 // screen views. Note this API is currently only supported on Chrome OS. | 769 // screen views. Note this API is currently only supported on Chrome OS. |
766 [nocompile] static void getDesktop(RootCallback callback); | 770 [nocompile] static void getDesktop(RootCallback callback); |
767 | 771 |
768 // Get the automation node that currently has focus, globally. Will return | 772 // Get the automation node that currently has focus, globally. Will return |
769 // null if none of the nodes in any loaded trees have focus. | 773 // null if none of the nodes in any loaded trees have focus. |
770 [nocompile] static void getFocus(FocusCallback callback); | 774 [nocompile] static void getFocus(FocusCallback callback); |
771 | 775 |
772 // Add a tree change observer. Tree change observers are static/global, they | 776 // Add a tree change observer. Tree change observers are static/global, they |
(...skipping 12 matching lines...) Expand all Loading... |
785 // Everything in the tree between the two node/offset pairs gets included | 789 // Everything in the tree between the two node/offset pairs gets included |
786 // in the selection. The anchor is where the user started the selection, | 790 // in the selection. The anchor is where the user started the selection, |
787 // while the focus is the point at which the selection gets extended | 791 // while the focus is the point at which the selection gets extended |
788 // e.g. when dragging with a mouse or using the keyboard. For nodes with | 792 // e.g. when dragging with a mouse or using the keyboard. For nodes with |
789 // the role staticText, the offset gives the character offset within | 793 // the role staticText, the offset gives the character offset within |
790 // the value where the selection starts or ends, respectively. | 794 // the value where the selection starts or ends, respectively. |
791 [nocompile] static void setDocumentSelection( | 795 [nocompile] static void setDocumentSelection( |
792 SetDocumentSelectionParams params); | 796 SetDocumentSelectionParams params); |
793 }; | 797 }; |
794 }; | 798 }; |
OLD | NEW |