Chromium Code Reviews| 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 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 435 | 435 |
| 436 // The nodes, if any, which form a label for this element. Generally, the | 436 // The nodes, if any, which form a label for this element. Generally, the |
| 437 // text from these elements will also be exposed as the element's accessible | 437 // text from these elements will also be exposed as the element's accessible |
| 438 // name, via the $(ref:automation.AutomationNode.name) attribute. | 438 // name, via the $(ref:automation.AutomationNode.name) attribute. |
| 439 AutomationNode[]? labelledBy; | 439 AutomationNode[]? labelledBy; |
| 440 | 440 |
| 441 // The node referred to by <code>aria-activedescendant</code>, where | 441 // The node referred to by <code>aria-activedescendant</code>, where |
| 442 // applicable | 442 // applicable |
| 443 AutomationNode? activeDescendant; | 443 AutomationNode? activeDescendant; |
| 444 | 444 |
| 445 // The target of an in page link. | |
|
michaelpg
2017/04/04 20:29:48
nit: hyphenate compound adjective, "in-page" (simi
David Tseng
2017/04/04 21:41:32
Done throughout and re-generated externs.
| |
| 446 AutomationNode? inPageLinkTarget; | |
| 447 | |
| 445 // | 448 // |
| 446 // Link attributes. | 449 // Link attributes. |
| 447 // | 450 // |
| 448 | 451 |
| 449 // The URL that this link will navigate to. | 452 // The URL that this link will navigate to. |
| 450 DOMString? url; | 453 DOMString? url; |
| 451 | 454 |
| 452 // | 455 // |
| 453 // Document attributes. | 456 // Document attributes. |
| 454 // | 457 // |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 751 | 754 |
| 752 // Called with the <code>AutomationNode</code> that currently has focus. | 755 // Called with the <code>AutomationNode</code> that currently has focus. |
| 753 callback FocusCallback = void(AutomationNode focusedNode); | 756 callback FocusCallback = void(AutomationNode focusedNode); |
| 754 | 757 |
| 755 interface Functions { | 758 interface Functions { |
| 756 // Get the automation tree for the tab with the given tabId, or the current | 759 // Get the automation tree for the tab with the given tabId, or the current |
| 757 // tab if no tabID is given, enabling automation if necessary. Returns a | 760 // tab if no tabID is given, enabling automation if necessary. Returns a |
| 758 // tree with a placeholder root node; listen for the "loadComplete" event to | 761 // tree with a placeholder root node; listen for the "loadComplete" event to |
| 759 // get a notification that the tree has fully loaded (the previous root node | 762 // get a notification that the tree has fully loaded (the previous root node |
| 760 // reference will stop working at or before this point). | 763 // reference will stop working at or before this point). |
| 761 [nocompile] static void getTree(optional long tabId, RootCallback callback); | 764 [nocompile] static void getTree(optional long tabId, |
| 765 optional RootCallback callback); | |
| 762 | 766 |
| 763 // Get the automation tree for the whole desktop which consists of all on | 767 // Get the automation tree for the whole desktop which consists of all on |
| 764 // screen views. Note this API is currently only supported on Chrome OS. | 768 // screen views. Note this API is currently only supported on Chrome OS. |
| 765 [nocompile] static void getDesktop(RootCallback callback); | 769 [nocompile] static void getDesktop(RootCallback callback); |
| 766 | 770 |
| 767 // Get the automation node that currently has focus, globally. Will return | 771 // Get the automation node that currently has focus, globally. Will return |
| 768 // null if none of the nodes in any loaded trees have focus. | 772 // null if none of the nodes in any loaded trees have focus. |
| 769 [nocompile] static void getFocus(FocusCallback callback); | 773 [nocompile] static void getFocus(FocusCallback callback); |
| 770 | 774 |
| 771 // Add a tree change observer. Tree change observers are static/global, they | 775 // Add a tree change observer. Tree change observers are static/global, they |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 784 // Everything in the tree between the two node/offset pairs gets included | 788 // Everything in the tree between the two node/offset pairs gets included |
| 785 // in the selection. The anchor is where the user started the selection, | 789 // in the selection. The anchor is where the user started the selection, |
| 786 // while the focus is the point at which the selection gets extended | 790 // while the focus is the point at which the selection gets extended |
| 787 // e.g. when dragging with a mouse or using the keyboard. For nodes with | 791 // e.g. when dragging with a mouse or using the keyboard. For nodes with |
| 788 // the role staticText, the offset gives the character offset within | 792 // the role staticText, the offset gives the character offset within |
| 789 // the value where the selection starts or ends, respectively. | 793 // the value where the selection starts or ends, respectively. |
| 790 [nocompile] static void setDocumentSelection( | 794 [nocompile] static void setDocumentSelection( |
| 791 SetDocumentSelectionParams params); | 795 SetDocumentSelectionParams params); |
| 792 }; | 796 }; |
| 793 }; | 797 }; |
| OLD | NEW |