Chromium Code Reviews| Index: chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_util.js |
| diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_util.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_util.js |
| index 374052e171147c9c433d201dfd90ee68c7fea818..e7cc0c8c3c8bc3d7d17a49d800d90627dc07dbca 100644 |
| --- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_util.js |
| +++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_util.js |
| @@ -18,7 +18,7 @@ cvox2.AutomationPredicates = function() {}; |
| /** |
| * Constructs a predicate given a role. |
| * @param {string} role |
|
Peter Lundblad
2014/10/03 12:03:53
Can we use the enum type here?
|
| - * @return {function(AutomationNode) : boolean} |
| + * @return {function(chrome.automation.AutomationNode) : boolean} |
| */ |
| cvox2.AutomationPredicates.makeRolePredicate = function(role) { |
| return function(node) { |
| @@ -26,15 +26,15 @@ cvox2.AutomationPredicates.makeRolePredicate = function(role) { |
| }; |
| }; |
| -/** @type {function(AutomationNode) : boolean} */ |
| +/** @type {function(chrome.automation.AutomationNode) : boolean} */ |
| cvox2.AutomationPredicates.heading = |
| cvox2.AutomationPredicates.makeRolePredicate( |
| chrome.automation.RoleType.heading); |
| -/** @type {function(AutomationNode) : boolean} */ |
| +/** @type {function(chrome.automation.AutomationNode) : boolean} */ |
| cvox2.AutomationPredicates.inlineTextBox = |
| cvox2.AutomationPredicates.makeRolePredicate( |
| chrome.automation.RoleType.inlineTextBox); |
| -/** @type {function(AutomationNode) : boolean} */ |
| +/** @type {function(chrome.automation.AutomationNode) : boolean} */ |
| cvox2.AutomationPredicates.link = |
| cvox2.AutomationPredicates.makeRolePredicate( |
| chrome.automation.RoleType.link); |
| @@ -58,11 +58,11 @@ cvox2.AutomationUtil = function() {}; |
| /** |
| * Find a node in subtree of |cur| satisfying |pred| using pre-order traversal. |
| - * @param {AutomationNode} cur Node to begin the search from. |
| + * @param {chrome.automation.AutomationNode} cur Node to begin the search from. |
| * @param {cvox2.Dir} dir |
| - * @param {function(AutomationNode) : boolean} pred A predicate to apply to a |
| - * candidate node. |
| - * @return {AutomationNode} |
| + * @param {function(chrome.automation.AutomationNode) : boolean} pred A |
| + * predicate to apply to a candidate node. |
| + * @return {chrome.automation.AutomationNode} |
| */ |
| cvox2.AutomationUtil.findNodePre = function(cur, dir, pred) { |
| if (pred(cur)) |
| @@ -80,11 +80,11 @@ cvox2.AutomationUtil.findNodePre = function(cur, dir, pred) { |
| /** |
| * Find a node in subtree of |cur| satisfying |pred| using post-order traversal. |
| - * @param {AutomationNode} cur Node to begin the search from. |
| + * @param {chrome.automation.AutomationNode} cur Node to begin the search from. |
| * @param {cvox2.Dir} dir |
| - * @param {function(AutomationNode) : boolean} pred A predicate to apply to a |
| - * candidate node. |
| - * @return {AutomationNode} |
| + * @param {function(chrome.automation.AutomationNode) : boolean} pred A |
| + * predicate to apply to a candidate node. |
| + * @return {chrome.automation.AutomationNode} |
| */ |
| cvox2.AutomationUtil.findNodePost = function(cur, dir, pred) { |
| var child = dir == cvox2.Dir.BACKWARD ? cur.lastChild() : cur.firstChild(); |
| @@ -103,9 +103,9 @@ cvox2.AutomationUtil.findNodePost = function(cur, dir, pred) { |
| /** |
| * Find the next node in the given direction that is either an immediate |
| * sibling or a sibling of an ancestor. |
| - * @param {AutomationNode} cur Node to start search from. |
| + * @param {chrome.automation.AutomationNode} cur Node to start search from. |
| * @param {cvox2.Dir} dir |
| - * @return {AutomationNode} |
| + * @return {chrome.automation.AutomationNode} |
| */ |
| cvox2.AutomationUtil.findNextSubtree = function(cur, dir) { |
| while (cur) { |
| @@ -120,11 +120,11 @@ cvox2.AutomationUtil.findNextSubtree = function(cur, dir) { |
| /** |
| * Find the next node in the given direction in depth first order. |
| - * @param {AutomationNode} cur Node to begin the search from. |
| + * @param {chrome.automation.AutomationNode} cur Node to begin the search from. |
| * @param {cvox2.Dir} dir |
| - * @param {function(AutomationNode) : boolean} pred A predicate to apply to a |
| - * candidate node. |
| - * @return {AutomationNode} |
| + * @param {function(chrome.automation.AutomationNode) : boolean} pred A |
| + * predicate to apply to a candidate node. |
| + * @return {chrome.automation.AutomationNode} |
| */ |
| cvox2.AutomationUtil.findNextNode = function(cur, dir, pred) { |
| var next = cur; |