| 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 /** | 5 /** |
| 6 * @fileoverview ChromeVox predicates for the automation extension API. | 6 * @fileoverview ChromeVox predicates for the automation extension API. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 goog.provide('AutomationPredicate'); | 9 goog.provide('AutomationPredicate'); |
| 10 goog.provide('AutomationPredicate.Binary'); | 10 goog.provide('AutomationPredicate.Binary'); |
| (...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 479 * hierarchical level. | 479 * hierarchical level. |
| 480 * @param {number} level 1-6 | 480 * @param {number} level 1-6 |
| 481 * @return {AutomationPredicate.Unary} | 481 * @return {AutomationPredicate.Unary} |
| 482 */ | 482 */ |
| 483 AutomationPredicate.makeHeadingPredicate = function(level) { | 483 AutomationPredicate.makeHeadingPredicate = function(level) { |
| 484 return function(node) { | 484 return function(node) { |
| 485 return node.role == Role.HEADING && node.hierarchicalLevel == level; | 485 return node.role == Role.HEADING && node.hierarchicalLevel == level; |
| 486 }; | 486 }; |
| 487 }; | 487 }; |
| 488 | 488 |
| 489 /** |
| 490 * Matches against nodes that we may be able to retrieve image data from. |
| 491 * @param {!AutomationNode} node |
| 492 * @return {boolean} |
| 493 */ |
| 494 AutomationPredicate.supportsImageData = AutomationPredicate.roles([ |
| 495 Role.CANVAS, |
| 496 Role.IMAGE, |
| 497 Role.VIDEO]); |
| 498 |
| 489 }); // goog.scope | 499 }); // goog.scope |
| OLD | NEW |