| 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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 // </ul> | 306 // </ul> |
| 307 // Thus, an <code>AutomationRootNode</code> may be a descendant of one or | 307 // Thus, an <code>AutomationRootNode</code> may be a descendant of one or |
| 308 // more <code>AutomationRootNode</code>s, and in turn have one or more | 308 // more <code>AutomationRootNode</code>s, and in turn have one or more |
| 309 // <code>AutomationRootNode</code>s in its descendants. Thus, the | 309 // <code>AutomationRootNode</code>s in its descendants. Thus, the |
| 310 // <code>root</code> property of the <code>AutomationRootNode</code> will be | 310 // <code>root</code> property of the <code>AutomationRootNode</code> will be |
| 311 // the immediate parent <code>AutomationRootNode</code>, or <code>null</code> | 311 // the immediate parent <code>AutomationRootNode</code>, or <code>null</code> |
| 312 // if this is the top-level <code>AutomationRootNode</code>. | 312 // if this is the top-level <code>AutomationRootNode</code>. |
| 313 // | 313 // |
| 314 // Extends $(ref:automation.AutomationNode). | 314 // Extends $(ref:automation.AutomationNode). |
| 315 [nocompile, noinline_doc] dictionary AutomationRootNode { | 315 [nocompile, noinline_doc] dictionary AutomationRootNode { |
| 316 // TODO(aboxhall/dtseng): implement loading. Kept separate to not include | |
| 317 // in generated docs. | |
| 318 | |
| 319 // Whether this AutomationRootNode is loaded or not. If false, call load() | 316 // Whether this AutomationRootNode is loaded or not. If false, call load() |
| 320 // to get the contents. | 317 // to get the contents. |
| 321 boolean loaded; | 318 boolean loaded; |
| 322 | 319 |
| 323 // Load the accessibility tree for this AutomationRootNode. | 320 // Load the accessibility tree for this AutomationRootNode. |
| 324 static void load(RootCallback callback); | 321 static void load(RootCallback callback); |
| 325 }; | 322 }; |
| 326 | 323 |
| 327 interface Functions { | 324 interface Functions { |
| 328 // Get the automation tree for the tab with the given tabId, or the current | 325 // Get the automation tree for the tab with the given tabId, or the current |
| 329 // tab if no tabID is given, enabling automation if necessary. Returns a | 326 // tab if no tabID is given, enabling automation if necessary. Returns a |
| 330 // tree with a placeholder root node; listen for the "loadComplete" event to | 327 // tree with a placeholder root node; listen for the "loadComplete" event to |
| 331 // get a notification that the tree has fully loaded (the previous root node | 328 // get a notification that the tree has fully loaded (the previous root node |
| 332 // reference will stop working at or before this point). | 329 // reference will stop working at or before this point). |
| 333 [nocompile] static void getTree(optional long tabId, RootCallback callback); | 330 [nocompile] static void getTree(optional long tabId, RootCallback callback); |
| 334 | 331 |
| 335 // Get the automation tree for the whole desktop which consists of all on | 332 // Get the automation tree for the whole desktop which consists of all on |
| 336 // screen views. Note this API is currently only supported on Chrome OS. | 333 // screen views. Note this API is currently only supported on Chrome OS. |
| 337 [nocompile] static void getDesktop(RootCallback callback); | 334 [nocompile] static void getDesktop(RootCallback callback); |
| 338 }; | 335 }; |
| 339 }; | 336 }; |
| OLD | NEW |