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. This is a tree | 6 // automation (accessibility) tree for the browser. This is a tree |
7 // representation, analogous to the DOM tree, which represents the | 7 // representation, analogous to the DOM tree, which represents the |
8 // <em>semantic</em> structure of a page, and can be used to programmatically | 8 // <em>semantic</em> structure of a page, and can be used to programmatically |
9 // interact with a page. | 9 // interact with a page. |
10 [nocompile] namespace automation { | 10 [nocompile] namespace automation { |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
85 DOMString eventType, AutomationListener listener, bool capture); | 85 DOMString eventType, AutomationListener listener, bool capture); |
86 }; | 86 }; |
87 | 87 |
88 // Called when the <code>AutomationTree</code> for the page is available. | 88 // Called when the <code>AutomationTree</code> for the page is available. |
89 callback RootCallback = void(AutomationTree tree); | 89 callback RootCallback = void(AutomationTree tree); |
90 | 90 |
91 interface Functions { | 91 interface Functions { |
92 // Get the automation tree for the current tab, enabling automation if | 92 // Get the automation tree for the current tab, enabling automation if |
93 // necessary. Returns a tree with a placeholder root node; listen for | 93 // necessary. Returns a tree with a placeholder root node; listen for |
94 // the "load_complete" event to get a notification that the tree has fully | 94 // the "load_complete" event to get a notification that the tree has fully |
95 // loaded (the previous root node reference will stop working at or before | 95 // loaded (the previous root node reference will stop working at or before |
David Tseng
2014/05/29 22:41:31
This comment needs updating (e.g. load_complete ->
aboxhall
2014/05/30 15:37:11
Done.
| |
96 // this point). | 96 // this point). |
97 [nocompile] static void getTree(RootCallback callback); | 97 [nocompile] static void getTree(optional long tabId, RootCallback callback); |
David Tseng
2014/05/29 22:41:31
Are we still ok with this name (getTab perhaps)?
aboxhall
2014/05/30 15:37:11
I like getTree as I think getTab will be confusing
| |
98 | 98 |
99 // Get the automation tree for the desktop. | 99 // Get the automation tree for the desktop. |
100 [nocompile] static void getDesktop(RootCallback callback); | 100 [nocompile] static void getDesktop(RootCallback callback); |
101 }; | 101 }; |
102 }; | 102 }; |
OLD | NEW |