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 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
360 enum TreeChangeObserverFilter { | 360 enum TreeChangeObserverFilter { |
361 noTreeChanges, | 361 noTreeChanges, |
362 liveRegionTreeChanges, | 362 liveRegionTreeChanges, |
363 textMarkerChanges, | 363 textMarkerChanges, |
364 allTreeChanges | 364 allTreeChanges |
365 }; | 365 }; |
366 | 366 |
367 // A listener for changes on the <code>AutomationNode</code> tree. | 367 // A listener for changes on the <code>AutomationNode</code> tree. |
368 callback TreeChangeObserver = void(TreeChange treeChange); | 368 callback TreeChangeObserver = void(TreeChange treeChange); |
369 | 369 |
370 dictionary CustomAction { | |
371 long id; | |
372 DOMString description; | |
373 }; | |
374 | |
370 // A single node in an Automation tree. | 375 // A single node in an Automation tree. |
371 [nocompile, noinline_doc] dictionary AutomationNode { | 376 [nocompile, noinline_doc] dictionary AutomationNode { |
372 // The root node of the tree containing this AutomationNode. | 377 // The root node of the tree containing this AutomationNode. |
373 AutomationNode? root; | 378 AutomationNode? root; |
374 | 379 |
375 // Whether this AutomationNode is a root node. | 380 // Whether this AutomationNode is a root node. |
376 boolean isRootNode; | 381 boolean isRootNode; |
377 | 382 |
378 // The role of this node. | 383 // The role of this node. |
379 RoleType? role; | 384 RoleType? role; |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
440 // name, via the $(ref:automation.AutomationNode.name) attribute. | 445 // name, via the $(ref:automation.AutomationNode.name) attribute. |
441 AutomationNode[]? labelledBy; | 446 AutomationNode[]? labelledBy; |
442 | 447 |
443 // The node referred to by <code>aria-activedescendant</code>, where | 448 // The node referred to by <code>aria-activedescendant</code>, where |
444 // applicable | 449 // applicable |
445 AutomationNode? activeDescendant; | 450 AutomationNode? activeDescendant; |
446 | 451 |
447 // The target of an in-page link. | 452 // The target of an in-page link. |
448 AutomationNode? inPageLinkTarget; | 453 AutomationNode? inPageLinkTarget; |
449 | 454 |
455 // An array of custom actions. | |
David Tseng
2017/05/16 22:18:55
We'll also need a method to perform the custom act
yawano
2017/06/02 09:02:38
Done.
| |
456 CustomAction[]? customActions; | |
457 | |
450 // | 458 // |
451 // Link attributes. | 459 // Link attributes. |
452 // | 460 // |
453 | 461 |
454 // The URL that this link will navigate to. | 462 // The URL that this link will navigate to. |
455 DOMString? url; | 463 DOMString? url; |
456 | 464 |
457 // | 465 // |
458 // Document attributes. | 466 // Document attributes. |
459 // | 467 // |
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
805 // Everything in the tree between the two node/offset pairs gets included | 813 // Everything in the tree between the two node/offset pairs gets included |
806 // in the selection. The anchor is where the user started the selection, | 814 // in the selection. The anchor is where the user started the selection, |
807 // while the focus is the point at which the selection gets extended | 815 // while the focus is the point at which the selection gets extended |
808 // e.g. when dragging with a mouse or using the keyboard. For nodes with | 816 // e.g. when dragging with a mouse or using the keyboard. For nodes with |
809 // the role staticText, the offset gives the character offset within | 817 // the role staticText, the offset gives the character offset within |
810 // the value where the selection starts or ends, respectively. | 818 // the value where the selection starts or ends, respectively. |
811 [nocompile] static void setDocumentSelection( | 819 [nocompile] static void setDocumentSelection( |
812 SetDocumentSelectionParams params); | 820 SetDocumentSelectionParams params); |
813 }; | 821 }; |
814 }; | 822 }; |
OLD | NEW |