Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(126)

Side by Side Diff: chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_predicate.js

Issue 2572573002: Hook up make visible action for views (Closed)
Patch Set: Hook up make visible action for views Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | ui/views/accessibility/ax_view_obj_wrapper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 AutomationPredicate.match = function(params) { 50 AutomationPredicate.match = function(params) {
51 var anyRole = params.anyRole || []; 51 var anyRole = params.anyRole || [];
52 var anyPredicate = params.anyPredicate || []; 52 var anyPredicate = params.anyPredicate || [];
53 return function(node) { 53 return function(node) {
54 return anyRole.some(function(role) { return role == node.role; }) || 54 return anyRole.some(function(role) { return role == node.role; }) ||
55 anyPredicate.some(function(p) { return p(node); }); 55 anyPredicate.some(function(p) { return p(node); });
56 }; 56 };
57 }; 57 };
58 58
59 /** @type {AutomationPredicate.Unary} */ 59 /** @type {AutomationPredicate.Unary} */
60 AutomationPredicate.checkBox = AutomationPredicate.roles([Role.checkBox]); 60 AutomationPredicate.checkBox =
61 AutomationPredicate.roles([Role.checkBox, Role.switch]);
61 /** @type {AutomationPredicate.Unary} */ 62 /** @type {AutomationPredicate.Unary} */
62 AutomationPredicate.comboBox = AutomationPredicate.roles( 63 AutomationPredicate.comboBox = AutomationPredicate.roles(
63 [Role.comboBox, Role.popUpButton, Role.menuListPopup]); 64 [Role.comboBox, Role.popUpButton, Role.menuListPopup]);
64 /** @type {AutomationPredicate.Unary} */ 65 /** @type {AutomationPredicate.Unary} */
65 AutomationPredicate.heading = AutomationPredicate.roles([Role.heading]); 66 AutomationPredicate.heading = AutomationPredicate.roles([Role.heading]);
66 /** @type {AutomationPredicate.Unary} */ 67 /** @type {AutomationPredicate.Unary} */
67 AutomationPredicate.inlineTextBox = 68 AutomationPredicate.inlineTextBox =
68 AutomationPredicate.roles([Role.inlineTextBox]); 69 AutomationPredicate.roles([Role.inlineTextBox]);
69 /** @type {AutomationPredicate.Unary} */ 70 /** @type {AutomationPredicate.Unary} */
70 AutomationPredicate.link = AutomationPredicate.roles([Role.link]); 71 AutomationPredicate.link = AutomationPredicate.roles([Role.link]);
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 * @param {number} level 1-6 471 * @param {number} level 1-6
471 * @return {AutomationPredicate.Unary} 472 * @return {AutomationPredicate.Unary}
472 */ 473 */
473 AutomationPredicate.makeHeadingPredicate = function(level) { 474 AutomationPredicate.makeHeadingPredicate = function(level) {
474 return function(node) { 475 return function(node) {
475 return node.role == Role.heading && node.hierarchicalLevel == level; 476 return node.role == Role.heading && node.hierarchicalLevel == level;
476 }; 477 };
477 }; 478 };
478 479
479 }); // goog.scope 480 }); // goog.scope
OLDNEW
« no previous file with comments | « no previous file | ui/views/accessibility/ax_view_obj_wrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698