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