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

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

Issue 1100763002: Inject CanAddURLToHistory into TopSitesImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prefs
Patch Set: Fix error introduced during rebase Created 5 years, 7 months 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
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.makeRolePredicate( 50 AutomationPredicate.makeRolePredicate(
51 chrome.automation.RoleType.link); 51 chrome.automation.RoleType.link);
52 52
53 /** 53 /**
54 * @param {chrome.automation.AutomationNode} node 54 * @param {chrome.automation.AutomationNode} node
55 * @return {boolean} 55 * @return {boolean}
56 */ 56 */
57 AutomationPredicate.leaf = function(node) { 57 AutomationPredicate.leaf = function(node) {
58 return !node.firstChild || 58 return !node.firstChild ||
59 node.role == chrome.automation.RoleType.button || 59 node.role == chrome.automation.RoleType.button ||
60 node.role == chrome.automation.RoleType.slider ||
60 node.children.every(function(n) { 61 node.children.every(function(n) {
61 return n.state.invisible; 62 return n.state.invisible;
62 }); 63 });
63 }; 64 };
64 65
65 /** 66 /**
66 * @param {chrome.automation.AutomationNode} node 67 * @param {chrome.automation.AutomationNode} node
67 * @return {boolean} 68 * @return {boolean}
68 */ 69 */
69 AutomationPredicate.leafWithText = function(node) { 70 AutomationPredicate.leafWithText = function(node) {
(...skipping 16 matching lines...) Expand all
86 87
87 /** 88 /**
88 * Leaf nodes that should be ignored. 89 * Leaf nodes that should be ignored.
89 * @param {chrome.automation.AutomationNode} node 90 * @param {chrome.automation.AutomationNode} node
90 * @return {boolean} 91 * @return {boolean}
91 */ 92 */
92 AutomationPredicate.shouldIgnoreLeaf = function(node) { 93 AutomationPredicate.shouldIgnoreLeaf = function(node) {
93 return AutomationPredicate.leaf(node) && 94 return AutomationPredicate.leaf(node) &&
94 node.role == chrome.automation.RoleType.client; 95 node.role == chrome.automation.RoleType.client;
95 }; 96 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698