| 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 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 callback QueryCallback = void(AutomationNode node); | 302 callback QueryCallback = void(AutomationNode node); |
| 303 | 303 |
| 304 // An event in the Automation tree. | 304 // An event in the Automation tree. |
| 305 [nocompile, noinline_doc] dictionary AutomationEvent { | 305 [nocompile, noinline_doc] dictionary AutomationEvent { |
| 306 // The $(ref:automation.AutomationNode) to which the event was targeted. | 306 // The $(ref:automation.AutomationNode) to which the event was targeted. |
| 307 AutomationNode target; | 307 AutomationNode target; |
| 308 | 308 |
| 309 // The type of the event. | 309 // The type of the event. |
| 310 EventType type; | 310 EventType type; |
| 311 | 311 |
| 312 // The source of this event. |
| 313 DOMString eventFrom; |
| 314 |
| 312 // Stops this event from further processing except for any remaining | 315 // Stops this event from further processing except for any remaining |
| 313 // listeners on $(ref:AutomationEvent.target). | 316 // listeners on $(ref:AutomationEvent.target). |
| 314 static void stopPropagation(); | 317 static void stopPropagation(); |
| 315 }; | 318 }; |
| 316 | 319 |
| 317 // A listener for events on an <code>AutomationNode</code>. | 320 // A listener for events on an <code>AutomationNode</code>. |
| 318 callback AutomationListener = void(AutomationEvent event); | 321 callback AutomationListener = void(AutomationEvent event); |
| 319 | 322 |
| 320 // A change to the Automation tree. | 323 // A change to the Automation tree. |
| 321 [nocompile, noinline_doc] dictionary TreeChange { | 324 [nocompile, noinline_doc] dictionary TreeChange { |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 648 // Everything in the tree between the two node/offset pairs gets included | 651 // Everything in the tree between the two node/offset pairs gets included |
| 649 // in the selection. The anchor is where the user started the selection, | 652 // in the selection. The anchor is where the user started the selection, |
| 650 // while the focus is the point at which the selection gets extended | 653 // while the focus is the point at which the selection gets extended |
| 651 // e.g. when dragging with a mouse or using the keyboard. For nodes with | 654 // e.g. when dragging with a mouse or using the keyboard. For nodes with |
| 652 // the role staticText, the offset gives the character offset within | 655 // the role staticText, the offset gives the character offset within |
| 653 // the value where the selection starts or ends, respectively. | 656 // the value where the selection starts or ends, respectively. |
| 654 [nocompile] static void setDocumentSelection( | 657 [nocompile] static void setDocumentSelection( |
| 655 SetDocumentSelectionParams params); | 658 SetDocumentSelectionParams params); |
| 656 }; | 659 }; |
| 657 }; | 660 }; |
| OLD | NEW |